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

Function GetPathDataSegmentSimpleDataWordLength

source/src/cip/cipepath.c:616–626  ·  view source on GitHub ↗

@brief Returns the amount of 16-bit data words in the Simple Data EPath * * @param cip_path Pointer to the start of the EPath message * @return The amount of 16-bit words of data in the EPath */

Source from the content-addressed store, hash-verified

614 * @return The amount of 16-bit words of data in the EPath
615 */
616CipUsint GetPathDataSegmentSimpleDataWordLength(
617 const unsigned char *const cip_path) {
618/* OPENER_ASSERT(kSegmentTypeDataSegment == GetPathSegmentType(cip_path),"Not a data segment!\n");
619 OPENER_ASSERT(kDataSegmentSubtypeSimpleData == GetPathDataSegmentSubtype(cip_path), "Not a simple data segment!\n") */
620 OPENER_ASSERT( kSegmentTypeDataSegment == GetPathSegmentType(cip_path) )
621 OPENER_ASSERT( kDataSegmentSubtypeSimpleData ==
622 GetPathDataSegmentSubtype(cip_path) )
623
624 const unsigned char *message_runner = cip_path + 1;
625 return GetSintFromMessage(&message_runner);
626}
627
628/*** End Data Segment ***/
629

Callers 1

TESTFunction · 0.85

Calls 3

GetPathSegmentTypeFunction · 0.85
GetSintFromMessageFunction · 0.85

Tested by 1

TESTFunction · 0.68