MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / SetPathPortSegmentExtendedPortIdentifier

Function SetPathPortSegmentExtendedPortIdentifier

source/src/cip/cipepath.c:198–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void SetPathPortSegmentExtendedPortIdentifier(
199 const unsigned int extended_port_identifier,
200 CipOctet *const cip_path) {
201 SetPathPortSegmentPortIdentifier(kPortSegmentExtendedPort, cip_path);
202 const unsigned int kExtendedPortSegmentPosition =
203 GetPathPortSegmentExtendedLinkAddressSizeBit(cip_path) == true ? 2 : 1;
204 cip_path[kExtendedPortSegmentPosition] = (char) (extended_port_identifier
205 & 0x00FF);
206 cip_path[kExtendedPortSegmentPosition + 1] =
207 (char) ( (extended_port_identifier & 0xFF00) >> 8 );
208}
209/*** Port Segment ***/
210
211/*** Logical Segment ***/

Callers 1

TESTFunction · 0.85

Tested by 1

TESTFunction · 0.68