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

Function GetPathDataSegmentSubtype

source/src/cip/cipepath.c:595–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593/*** Data Segment ***/
594
595DataSegmentSubtype GetPathDataSegmentSubtype(const unsigned char *const cip_path)
596{
597 const unsigned int kDataSegmentSubtypeMask = 0x1F;
598 const unsigned int data_subtype = (*cip_path) & kDataSegmentSubtypeMask;
599
600 DataSegmentSubtype result = kDataSegmentSubtypeReserved;
601 switch(data_subtype) {
602 case DATA_SEGMENT_SUBTYPE_SIMPLE_DATA:
603 result = kDataSegmentSubtypeSimpleData; break;
604 case DATA_SEGMENT_SUBTYPE_ANSI_EXTENDED_SYMBOL:
605 result = kDataSegmentSubtypeANSIExtendedSymbol; break;
606 default: result = kDataSegmentSubtypeReserved; break;
607 }
608 return result;
609}
610
611/** @brief Returns the amount of 16-bit data words in the Simple Data EPath
612 *

Callers 3

ParseConnectionPathFunction · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68