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

Function SetPathSegmentType

source/src/cip/cipepath.c:113–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void SetPathSegmentType(SegmentType segment_type,
114 unsigned char *const cip_path) {
115 switch (segment_type) {
116 case kSegmentTypePortSegment:
117 *cip_path = SEGMENT_TYPE_PORT_SEGMENT;
118 break;
119 case kSegmentTypeLogicalSegment:
120 *cip_path = SEGMENT_TYPE_LOGICAL_SEGMENT;
121 break;
122 case kSegmentTypeNetworkSegment:
123 *cip_path = SEGMENT_TYPE_NETWORK_SEGMENT;
124 break;
125 case kSegmentTypeSymbolicSegment:
126 *cip_path = SEGMENT_TYPE_SYMBOLIC_SEGMENT;
127 break;
128 case kSegmentTypeDataSegment:
129 *cip_path = SEGMENT_TYPE_DATA_SEGMENT;
130 break;
131 case kSegmentTypeDataTypeConstructed:
132 *cip_path = SEGMENT_TYPE_DATA_TYPE_CONSTRUCTED;
133 break;
134 case kSegmentTypeDataTypeElementary:
135 *cip_path = SEGMENT_TYPE_DATA_TYPE_ELEMENTARTY;
136 break;
137 case kSegmentTypeReserved:
138 *cip_path = SEGMENT_TYPE_SEGMENT_RESERVED;
139 break;
140 default:
141 OPENER_ASSERT(
142 "Invalid Segment type chosen! We should never come here!\n")
143 break;
144 }
145}
146
147/*** Port Segment ***/
148bool GetPathPortSegmentExtendedLinkAddressSizeBit(

Callers 2

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68