resolution.cpp (c85716ca7532aded52285f91ce4741091f77cdb5) | resolution.cpp (9513582b8748fe2566ff451c2a2514e079dd56fb) |
---|---|
1#include <analyzer/resolution.hpp> 2#include <util/pdbg.hpp> 3#include <util/trace.hpp> 4 5namespace analyzer 6{ 7 8void HardwareCalloutResolution::resolve(ServiceData& io_sd) const --- 9 unchanged lines hidden (view full) --- 18 trgt = util::pdbg::getTrgt(path); 19 if (nullptr == trgt) 20 { 21 trace::err("Unable to find target for %s", path.c_str()); 22 return; // can't continue 23 } 24 } 25 | 1#include <analyzer/resolution.hpp> 2#include <util/pdbg.hpp> 3#include <util/trace.hpp> 4 5namespace analyzer 6{ 7 8void HardwareCalloutResolution::resolve(ServiceData& io_sd) const --- 9 unchanged lines hidden (view full) --- 18 trgt = util::pdbg::getTrgt(path); 19 if (nullptr == trgt) 20 { 21 trace::err("Unable to find target for %s", path.c_str()); 22 return; // can't continue 23 } 24 } 25 |
26 // Get the location code for this target. 27 auto locCode = util::pdbg::getLocationCode(trgt); | 26 // Get the location code and entity path for this target. 27 auto locCode = util::pdbg::getLocationCode(trgt); 28 auto entityPath = util::pdbg::getPhysDevPath(trgt); |
28 29 // Add the actual callout to the service data. 30 nlohmann::json callout; 31 callout["LocationCode"] = locCode; 32 callout["Priority"] = iv_priority.getUserDataString(); 33 io_sd.addCallout(callout); 34 | 29 30 // Add the actual callout to the service data. 31 nlohmann::json callout; 32 callout["LocationCode"] = locCode; 33 callout["Priority"] = iv_priority.getUserDataString(); 34 io_sd.addCallout(callout); 35 |
35 // Add entity path to gard list. 36 auto entityPath = util::pdbg::getPhysDevPath(trgt); 37 if (entityPath.empty()) 38 { 39 trace::err("Unable to find entity path for %s", path.c_str()); 40 } 41 else 42 { 43 Guard::Type guard = Guard::NONE; 44 if (iv_guard) 45 { 46 guard = io_sd.queryCheckstop() ? Guard::FATAL : Guard::NON_FATAL; 47 } 48 49 io_sd.addGuard(std::make_shared<Guard>(entityPath, guard)); 50 } | 36 // Add the guard info to the service data. 37 io_sd.addGuard(entityPath, iv_guard); |
51} 52 53//------------------------------------------------------------------------------ 54 55void ProcedureCalloutResolution::resolve(ServiceData& io_sd) const 56{ 57 // Add the actual callout to the service data. 58 nlohmann::json callout; 59 callout["Procedure"] = iv_procedure.getString(); 60 callout["Priority"] = iv_priority.getUserDataString(); 61 io_sd.addCallout(callout); 62} 63 64//------------------------------------------------------------------------------ 65 66} // namespace analyzer | 38} 39 40//------------------------------------------------------------------------------ 41 42void ProcedureCalloutResolution::resolve(ServiceData& io_sd) const 43{ 44 // Add the actual callout to the service data. 45 nlohmann::json callout; 46 callout["Procedure"] = iv_procedure.getString(); 47 callout["Priority"] = iv_priority.getUserDataString(); 48 io_sd.addCallout(callout); 49} 50 51//------------------------------------------------------------------------------ 52 53} // namespace analyzer |