MCPcopy Create free account
hub / github.com/Beckhoff/ADS / RunCommand

Method RunCommand

AdsLib/MasterDcStatAccess.cpp:86–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86long MasterDcStatAccess::RunCommand(ECADS_IOFFS_MASTER_DC_STAT command) const
87{
88 const std::map<ECADS_IOFFS_MASTER_DC_STAT, std::string> dcDiagNames = {
89 { ECADS_IOFFS_MASTER_DC_STAT::ACTIVATE, "Activating" },
90 { ECADS_IOFFS_MASTER_DC_STAT::CLEAR, "Clearing" },
91 { ECADS_IOFFS_MASTER_DC_STAT::DEACTIVATE, "Deactivating" },
92 };
93
94 const auto status = device.WriteReqEx(ECADS_IGRP_MASTER_DC_STAT,
95 command, 0, nullptr);
96
97 if (status != ADSERR_NOERR) {
98 LOG_ERROR(dcDiagNames.at(command)
99 << " DC diagnosis failed with 0x" << std::hex
100 << status);
101 return status;
102 }
103
104 return status;
105}
106}
107}

Callers

nothing calls this directly

Calls 1

WriteReqExMethod · 0.80

Tested by

no test coverage detected