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

Function GetPathLogicalSegmentElectronicKeyFormat

source/src/cip/cipepath.c:426–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426ElectronicKeySegmentFormat GetPathLogicalSegmentElectronicKeyFormat(
427 const unsigned char *const cip_path) {
428/* OPENER_ASSERT(kLogicalSegmentSpecialTypeLogicalFormatElectronicKey ==
429 GetPathLogicalSegmentSpecialTypeLogicalType(cip_path), "Not an electronic key!\n") */
430 OPENER_ASSERT( kLogicalSegmentSpecialTypeLogicalFormatElectronicKey ==
431 GetPathLogicalSegmentSpecialTypeLogicalType(cip_path) )
432 ElectronicKeySegmentFormat result = kElectronicKeySegmentFormatReserved;
433 switch( *(cip_path + 1) ) {
434 case ELECTRONIC_KEY_SEGMENT_KEY_FORMAT_4: result =
435 kElectronicKeySegmentFormatKeyFormat4; break;
436 default: result = kElectronicKeySegmentFormatReserved; break;
437 }
438 return result;
439}
440
441void GetElectronicKeyFormat4FromMessage(
442 const CipOctet **const message,

Callers 3

ParseConnectionPathFunction · 0.85
TESTFunction · 0.85

Tested by 1

TESTFunction · 0.68