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

Function GetPathSymbolicSegmentNumericType

source/src/cip/cipepath.c:552–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552SymbolicSegmentExtendedFormat GetPathSymbolicSegmentNumericType(
553 const unsigned char *const cip_path) {
554 const unsigned int kSymbolicSegmentExtendedFormatNumericTypeMask = 0x1F;
555 const unsigned int numeric_subtype = *(cip_path + 1) &
556 kSymbolicSegmentExtendedFormatNumericTypeMask;
557 SymbolicSegmentExtendedFormat result = kSymbolicSegmentExtendedFormatReserved;
558 switch(numeric_subtype) {
559 case SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_USINT_TYPE: result =
560 kSymbolicSegmentExtendedFormatNumericSymbolUSINT; break;
561 case SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_UINT_TYPE: result =
562 kSymbolicSegmentExtendedFormatNumericSymbolUINT; break;
563 case SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_UDINT_TYPE: result =
564 kSymbolicSegmentExtendedFormatNumericSymbolUDINT; break;
565 default: result = kSymbolicSegmentExtendedFormatReserved; break;
566 }
567 return result;
568}
569
570SymbolicSegmentExtendedFormat GetPathSymbolicSegmentExtendedFormat(
571 const unsigned char *const cip_path) {

Callers 2

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68