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

Function SetPathLogicalSegmentLogicalFormat

source/src/cip/cipepath.c:311–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311void SetPathLogicalSegmentLogicalFormat(LogicalSegmentLogicalFormat format,
312 CipOctet *const cip_path) {
313 OPENER_ASSERT( kSegmentTypeLogicalSegment ==
314 GetPathSegmentType( (const CipOctet *)cip_path ) )
315 switch (format) {
316 case kLogicalSegmentLogicalFormatEightBit:
317 (*cip_path) |= LOGICAL_SEGMENT_FORMAT_EIGHT_BIT;
318 break;
319 case kLogicalSegmentLogicalFormatSixteenBit:
320 (*cip_path) |= LOGICAL_SEGMENT_FORMAT_SIXTEEN_BIT;
321 break;
322 case kLogicalSegmentLogicalFormatThirtyTwoBit:
323 (*cip_path) |= LOGICAL_SEGMENT_FORMAT_THIRTY_TWO_BIT;
324 break;
325 default:
326 OPENER_ASSERT(
327 "Logical segment/logical type: Invalid logical type detected!\n")
328 break;
329 }
330}
331
332const CipDword CipEpathGetLogicalValue(const EipUint8 **message) {
333 LogicalSegmentLogicalFormat logical_format =

Callers 1

Calls 1

GetPathSegmentTypeFunction · 0.85

Tested by

no test coverage detected