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

Function GetPathPortSegmentPortIdentifier

source/src/cip/cipepath.c:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158unsigned int GetPathPortSegmentPortIdentifier(
159 const unsigned char *const cip_path) {
160 const unsigned int kPortIdentifierMask = 0x0F;
161 unsigned int port_identifier = *cip_path & kPortIdentifierMask;
162/* OPENER_ASSERT(0 != port_identifier, "Use of reserved port identifier 0\n"); */
163 OPENER_ASSERT( kSegmentTypePortSegment == GetPathSegmentType(cip_path) )
164 OPENER_ASSERT(0 != port_identifier)
165 return port_identifier;
166}
167
168void SetPathPortSegmentPortIdentifier(const unsigned int port_identifier,
169 unsigned char *const cip_path) {

Callers 2

TESTFunction · 0.85

Calls 1

GetPathSegmentTypeFunction · 0.85

Tested by 1

TESTFunction · 0.68