OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cipepath.h File Reference
#include <stdbool.h>
#include "ciptypes.h"
#include "cipelectronickey.h"
Include dependency graph for cipepath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  connection_path_epath
 

Macros

#define LOGICAL_SEGMENT_EXTENDED_TYPE_ARRAY_INDEX   0x01
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_BIT_INDEX   0x03
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_INDIRECT_ARRAY_INDEX   0x02
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_INDIRECT_BIT_INDEX   0x04
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_RESERVED   0x00
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_STRUCTURE_MEMBER_HANDLE   0x06
 
#define LOGICAL_SEGMENT_EXTENDED_TYPE_STRUCTURE_MEMBER_NUMBER   0x05
 
#define LOGICAL_SEGMENT_FORMAT_EIGHT_BIT   0x00
 
#define LOGICAL_SEGMENT_FORMAT_SIXTEEN_BIT   0x01
 
#define LOGICAL_SEGMENT_FORMAT_THIRTY_TWO_BIT   0x02
 
#define LOGICAL_SEGMENT_SPECIAL_TYPE_FORMAT_ELECTRONIC_KEY   0x00
 
#define LOGICAL_SEGMENT_TYPE_ATTRIBUTE_ID   0x10
 
#define LOGICAL_SEGMENT_TYPE_CLASS_ID   0x00
 
#define LOGICAL_SEGMENT_TYPE_CONNECTION_POINT   0x0C
 
#define LOGICAL_SEGMENT_TYPE_EXTENDED_LOGICAL   0x1C
 
#define LOGICAL_SEGMENT_TYPE_INSTANCE_ID   0x04
 
#define LOGICAL_SEGMENT_TYPE_MEMBER_ID   0x08
 
#define LOGICAL_SEGMENT_TYPE_SERVICE_ID   0x18
 
#define LOGICAL_SEGMENT_TYPE_SPECIAL   0x14
 
#define NETWORK_SEGMENT_SUBTYPE_EXTENDED_NETWORK   0x1F
 
#define NETWORK_SEGMENT_SUBTYPE_FIXED_TAG   0x02
 
#define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MICROSECONDS   0x10
 
#define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MILLISECONDS   0x03
 
#define NETWORK_SEGMENT_SUBTYPE_SAFETY   0x04
 
#define NETWORK_SEGMENT_SUBTYPE_SCHEDULE   0x01
 
#define SEGMENT_TYPE_DATA_SEGMENT   0x80
 
#define SEGMENT_TYPE_DATA_TYPE_CONSTRUCTED   0xA0
 
#define SEGMENT_TYPE_DATA_TYPE_ELEMENTARTY   0xC0
 
#define SEGMENT_TYPE_LOGICAL_SEGMENT   0x20
 
#define SEGMENT_TYPE_NETWORK_SEGMENT   0x40
 
#define SEGMENT_TYPE_PORT_SEGMENT   0x00
 
#define SEGMENT_TYPE_SEGMENT_RESERVED   0xE0
 
#define SEGMENT_TYPE_SYMBOLIC_SEGMENT   0x60
 

Typedefs

typedef struct
connection_path_epath 
CipConnectionPathEpath
 
typedef enum data_segment_subtype DataSegmentSubtype
 Data segment sub types. More...
 
typedef enum
electronic_key_segment_format 
ElectronicKeySegmentFormat
 Electronic key formats. More...
 
typedef enum
logical_segment_extended_logical_type 
LogicalSegmentExtendedLogicalType
 
typedef enum
logical_segment_logical_format 
LogicalSegmentLogicalFormat
 Enum containing values how long the encoded value will be (8, 16, or 32 bit) More...
 
typedef enum logical_segment_type LogicalSegmentLogicalType
 Enum containing values which kind of logical segment is encoded. More...
 
typedef enum
logical_segment_special_type_logical_format 
LogicalSegmentSpecialTypeLogicalFormat
 
typedef enum
network_segment_subtype 
NetworkSegmentSubtype
 All types of network segment types for the use in all code. More...
 
typedef enum port_segment_type PortSegmentFlag
 Port Segment flags. More...
 
typedef enum segment_type SegmentType
 Segment type Enum. More...
 
typedef enum
symbolic_segment_extended_format 
SymbolicSegmentExtendedFormat
 Extended symbolic symbol formats. More...
 
typedef enum
symbolic_segment_format 
SymbolicSegmentFormat
 Symbolic segment formats. More...
 

Enumerations

enum  data_segment_subtype { kDataSegmentSubtypeReserved, kDataSegmentSubtypeSimpleData, kDataSegmentSubtypeANSIExtendedSymbol }
 Data segment sub types. More...
 
enum  electronic_key_segment_format { kElectronicKeySegmentFormatReserved, kElectronicKeySegmentFormatKeyFormat4 }
 Electronic key formats. More...
 
enum  logical_segment_extended_logical_type {
  kLogicalSegmentExtendedLogicalTypeReserved, kLogicalSegmentExtendedLogicalTypeArrayIndex, kLogicalSegmentExtendedLogicalTypeIndirectArrayIndex, kLogicalSegmentExtendedLogicalTypeBitIndex,
  kLogicalSegmentExtendedLogicalTypeIndirectBitIndex, kLogicalSegmentExtendedLogicalTypeStructureMemberNumber, kLogicalSegmentExtendedLogicalTypeStructureMemberHandle
}
 
enum  logical_segment_logical_format { kLogicalSegmentLogicalFormatEightBit, kLogicalSegmentLogicalFormatSixteenBit, kLogicalSegmentLogicalFormatThirtyTwoBit }
 Enum containing values how long the encoded value will be (8, 16, or 32 bit) More...
 
enum  logical_segment_special_type_logical_format { kLogicalSegmentSpecialTypeLogicalFormatReserved, kLogicalSegmentSpecialTypeLogicalFormatElectronicKey }
 
enum  logical_segment_type {
  kLogicalSegmentLogicalTypeClassId, kLogicalSegmentLogicalTypeInstanceId, kLogicalSegmentLogicalTypeMemberId, kLogicalSegmentLogicalTypeConnectionPoint,
  kLogicalSegmentLogicalTypeAttributeId, kLogicalSegmentLogicalTypeSpecial, kLogicalSegmentLogicalTypeServiceId, kLogicalSegmentLogicalTypeExtendedLogical
}
 Enum containing values which kind of logical segment is encoded. More...
 
enum  network_segment_subtype {
  kNetworkSegmentSubtypeReserved, kNetworkSegmentSubtypeScheduleSegment, kNetworkSegmentSubtypeFixedTagSegment, kNetworkSegmentSubtypeProductionInhibitTimeInMilliseconds,
  kNetworkSegmentSubtypeSafetySegment, kNetworkSegmentSubtypeProductionInhibitTimeInMicroseconds, kNetworkSegmentSubtypeExtendedNetworkSegment
}
 All types of network segment types for the use in all code. More...
 
enum  port_segment_type { kPortSegmentFlagExtendedLinkAddressSize = 0x10 }
 Port Segment flags. More...
 
enum  segment_type {
  kSegmentTypePortSegment, kSegmentTypeLogicalSegment, kSegmentTypeNetworkSegment, kSegmentTypeSymbolicSegment,
  kSegmentTypeDataSegment, kSegmentTypeDataTypeConstructed, kSegmentTypeDataTypeElementary, kSegmentTypeReserved
}
 Segment type Enum. More...
 
enum  symbolic_segment_extended_format {
  kSymbolicSegmentExtendedFormatDoubleByteChars, kSymbolicSegmentExtendedFormatTripleByteChars, kSymbolicSegmentExtendedFormatNumericSymbolUSINT, kSymbolicSegmentExtendedFormatNumericSymbolUINT,
  kSymbolicSegmentExtendedFormatNumericSymbolUDINT, kSymbolicSegmentExtendedFormatReserved
}
 Extended symbolic symbol formats. More...
 
enum  symbolic_segment_format { kSymbolicSegmentFormatASCII, kSymbolicSegmentFormatExtendedString }
 Symbolic segment formats. More...
 

Functions

size_t CipEpathEncodeConnectionEpath (const CipConnectionPathEpath *const connection_epath, CipOctet **encoded_path)
 
bool CipEpathEqual (const CipOctet *const path1, const CipUint path1_length, const CipOctet *const path2, const CipUint path2_length)
 
const CipDword CipEpathGetLogicalValue (const EipUint8 **message)
 
size_t CipEpathSetLogicalValue (const CipDword logical_value, const LogicalSegmentLogicalFormat logical_format, CipOctet **message)
 
void GetElectronicKeyFormat4FromMessage (const CipOctet **const cip_path, ElectronicKeyFormat4 *key)
 Gets the data for an Electronic Key of format 4 from the EPath message. More...
 
CipUsint GetPathDataSegmentSimpleDataWordLength (const unsigned char *const cip_path)
 Gets the data word length of a Simple Data segment. More...
 
DataSegmentSubtype GetPathDataSegmentSubtype (const unsigned char *const cip_path)
 Gets the Data Segment subtype of a Data Segment EPath message. More...
 
ElectronicKeySegmentFormat GetPathLogicalSegmentElectronicKeyFormat (const unsigned char *const cip_path)
 Gets the Electronic Key format of a Logical Segment Special Type EPath message. More...
 
LogicalSegmentExtendedLogicalType GetPathLogicalSegmentExtendedLogicalType (const unsigned char *const cip_path)
 Gets the Extended Logical Type of a Logical Segment EPath message. More...
 
LogicalSegmentLogicalFormat GetPathLogicalSegmentLogicalFormat (const unsigned char *const cip_path)
 Gets the Logical Format of a Logical Segment EPath message. More...
 
LogicalSegmentLogicalType GetPathLogicalSegmentLogicalType (const unsigned char *const cip_path)
 Gets the Logical Type of an EPath Logical Segment message. More...
 
LogicalSegmentSpecialTypeLogicalFormat GetPathLogicalSegmentSpecialTypeLogicalType (const unsigned char *const cip_path)
 Gets the Special Type Logical Type of a Logical Segment EPath message. More...
 
CipUdint GetPathNetworkSegmentProductionInhibitTimeInMicroseconds (const unsigned char *const cip_path)
 Gets the Production Inhibit Time in Microseconds. More...
 
CipUsint GetPathNetworkSegmentProductionInhibitTimeInMilliseconds (const unsigned char *const cip_path)
 Gets the Production Inhibit Time in Milliseconds. More...
 
NetworkSegmentSubtype GetPathNetworkSegmentSubtype (const unsigned char *const cip_path)
 Gets the Network Segment Subtype of a EPatch Network Segement EPath message. More...
 
bool GetPathPortSegmentExtendedLinkAddressSizeBit (const unsigned char *const cip_path)
 Only to be used on Port Segments. Returns if the Port Segment has the extended link address size bit set. More...
 
unsigned int GetPathPortSegmentExtendedPortNumber (const unsigned char *const cip_path)
 Only to be used on Port Segments with Extended Port Number. Gets the Extended Port Number. More...
 
unsigned int GetPathPortSegmentLinkAddressSize (const unsigned char *const cip_path)
 Only to be used on Port Segments. Gets the Link Address Size. More...
 
unsigned int GetPathPortSegmentPortIdentifier (const unsigned char *const cip_path)
 Only to be used on Port Segments. Returns the Port Identifier. More...
 
SegmentType GetPathSegmentType (const CipOctet *const cip_path)
 Gets the basic segment type of a CIP EPath. More...
 
SymbolicSegmentExtendedFormat GetPathSymbolicSegmentExtendedFormat (const unsigned char *const cip_path)
 Gets the Extended Format subtype of a Symbolic Segment EPath message. More...
 
SymbolicSegmentFormat GetPathSymbolicSegmentFormat (const unsigned char *const cip_path)
 Gets the Symbolic Segment Format of the Symbolic Segment EPath message. More...
 
SymbolicSegmentExtendedFormat GetPathSymbolicSegmentNumericType (const unsigned char *const cip_path)
 Gets the Numeric subtype of a Symbolic Segment Extended Format EPath message. More...
 
void SetPathLogicalSegmentLogicalFormat (LogicalSegmentLogicalFormat format, CipOctet *const cip_path)
 
void SetPathLogicalSegmentLogicalType (LogicalSegmentLogicalType logical_type, CipOctet *const cip_path)
 
void SetPathPortSegmentExtendedPortIdentifier (const unsigned int extended_port_identifier, CipOctet *const cip_path)
 Sets the Extended Port Identifier in a EPath Port Segment message. More...
 
void SetPathPortSegmentPortIdentifier (const unsigned int port_identifier, unsigned char *const cip_path)
 Sets the Port Identifier form an Port Segment EPath to be sent. More...
 
void SetPathSegmentType (SegmentType segment_type, unsigned char *const cip_path)
 Sets the basic segment type of an CIP EPath to be sent. More...
 

Macro Definition Documentation

#define LOGICAL_SEGMENT_EXTENDED_TYPE_ARRAY_INDEX   0x01

Message value indicating the Array Index Extended Logical Segment type

Definition at line 38 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_BIT_INDEX   0x03

Message value indicating the Bit Index Extended Logical Segment type

Definition at line 40 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_INDIRECT_ARRAY_INDEX   0x02

Message value indicating the Indirect Array Index Extended Logical Segment type

Definition at line 39 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_INDIRECT_BIT_INDEX   0x04

Message value indicating the Indirect Bit Index Extended Logical Segment type

Definition at line 41 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_RESERVED   0x00

Message value indicating an reserved/unused Extended Logical Segment type

Definition at line 37 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_STRUCTURE_MEMBER_HANDLE   0x06

Message value indicating the Structured Member Handler Extended Logical Segment type

Definition at line 43 of file cipepath.h.

#define LOGICAL_SEGMENT_EXTENDED_TYPE_STRUCTURE_MEMBER_NUMBER   0x05

Message value indicating the Structured Member Number Extended Logical Segment type

Definition at line 42 of file cipepath.h.

#define LOGICAL_SEGMENT_FORMAT_EIGHT_BIT   0x00

Message value indicating an 8 bit value

Definition at line 33 of file cipepath.h.

#define LOGICAL_SEGMENT_FORMAT_SIXTEEN_BIT   0x01

Message value indicating an 16 bit value

Definition at line 34 of file cipepath.h.

#define LOGICAL_SEGMENT_FORMAT_THIRTY_TWO_BIT   0x02

Message value indicating an 32 bit value

Definition at line 35 of file cipepath.h.

#define LOGICAL_SEGMENT_SPECIAL_TYPE_FORMAT_ELECTRONIC_KEY   0x00

Message value indicating an electronic key

Definition at line 45 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_ATTRIBUTE_ID   0x10

Message value of the logical segment/logical type Attribute ID

Definition at line 28 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_CLASS_ID   0x00

Message value of the logical segment/logical type Class ID

Definition at line 24 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_CONNECTION_POINT   0x0C

Message value of the logical segment/logical type Connection Point

Definition at line 27 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_EXTENDED_LOGICAL   0x1C

Message value of the logical segment/logical type Extended Logical

Definition at line 31 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_INSTANCE_ID   0x04

Message value of the logical segment/logical type Instance ID

Definition at line 25 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_MEMBER_ID   0x08

Message value of the logical segment/logical type Member ID

Definition at line 26 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_SERVICE_ID   0x18

Message value of the logical segment/logical type Service ID

Definition at line 30 of file cipepath.h.

#define LOGICAL_SEGMENT_TYPE_SPECIAL   0x14

Message value of the logical segment/logical type Special

Definition at line 29 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_EXTENDED_NETWORK   0x1F

Message indicating a network message extended network message

Definition at line 52 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_FIXED_TAG   0x02

Message value indicating a network segment fixed tag message

Definition at line 48 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MICROSECONDS   0x10

Message value indicating a network segment PIT in microseconds message

Definition at line 51 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MILLISECONDS   0x03

Message value indicating a network segment PIT in milliseconds message

Definition at line 49 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_SAFETY   0x04

Message value indicating a network segment safety message

Definition at line 50 of file cipepath.h.

#define NETWORK_SEGMENT_SUBTYPE_SCHEDULE   0x01

Message value indicating a network segment schedule message

Definition at line 47 of file cipepath.h.

#define SEGMENT_TYPE_DATA_SEGMENT   0x80

Message value of the Data segment

Definition at line 19 of file cipepath.h.

#define SEGMENT_TYPE_DATA_TYPE_CONSTRUCTED   0xA0

Message value of the Data type constructed

Definition at line 20 of file cipepath.h.

#define SEGMENT_TYPE_DATA_TYPE_ELEMENTARTY   0xC0

Message value of the Data type elementary

Definition at line 21 of file cipepath.h.

#define SEGMENT_TYPE_LOGICAL_SEGMENT   0x20

Message value of the Logical segment

Definition at line 16 of file cipepath.h.

#define SEGMENT_TYPE_NETWORK_SEGMENT   0x40

Message value of the Network segment

Definition at line 17 of file cipepath.h.

#define SEGMENT_TYPE_PORT_SEGMENT   0x00

Message value of the Port segment

Definition at line 15 of file cipepath.h.

#define SEGMENT_TYPE_SEGMENT_RESERVED   0xE0

Reserved value

Definition at line 22 of file cipepath.h.

#define SEGMENT_TYPE_SYMBOLIC_SEGMENT   0x60

Message value of the Symbolic segment

Definition at line 18 of file cipepath.h.

Typedef Documentation

Data segment sub types.

Electronic key formats.

Enum containing values how long the encoded value will be (8, 16, or 32 bit)

Enum containing values which kind of logical segment is encoded.

All types of network segment types for the use in all code.

Enum constants for the different network segment subtypes to decouple code from the actual needed message values

Port Segment flags.

typedef enum segment_type SegmentType

Segment type Enum.

Bits 7-5 in the Segment Type/Format byte

Extended symbolic symbol formats.

Symbolic segment formats.

Enumeration Type Documentation

Data segment sub types.

Enumerator
kDataSegmentSubtypeReserved 

Reserved

kDataSegmentSubtypeSimpleData 

Simple Data segment

kDataSegmentSubtypeANSIExtendedSymbol 

ANSI extended symbol segment

Definition at line 136 of file cipepath.h.

Electronic key formats.

Enumerator
kElectronicKeySegmentFormatReserved 

Reserved

kElectronicKeySegmentFormatKeyFormat4 

Electronic key format 4 key

Definition at line 114 of file cipepath.h.

Enumerator
kLogicalSegmentExtendedLogicalTypeReserved 
kLogicalSegmentExtendedLogicalTypeArrayIndex 
kLogicalSegmentExtendedLogicalTypeIndirectArrayIndex 
kLogicalSegmentExtendedLogicalTypeBitIndex 
kLogicalSegmentExtendedLogicalTypeIndirectBitIndex 
kLogicalSegmentExtendedLogicalTypeStructureMemberNumber 
kLogicalSegmentExtendedLogicalTypeStructureMemberHandle 

Definition at line 88 of file cipepath.h.

Enum containing values how long the encoded value will be (8, 16, or 32 bit)

Enumerator
kLogicalSegmentLogicalFormatEightBit 
kLogicalSegmentLogicalFormatSixteenBit 
kLogicalSegmentLogicalFormatThirtyTwoBit 

Definition at line 100 of file cipepath.h.

Enumerator
kLogicalSegmentSpecialTypeLogicalFormatReserved 
kLogicalSegmentSpecialTypeLogicalFormatElectronicKey 

Definition at line 106 of file cipepath.h.

Enum containing values which kind of logical segment is encoded.

Enumerator
kLogicalSegmentLogicalTypeClassId 

Class ID

kLogicalSegmentLogicalTypeInstanceId 

Instance ID

kLogicalSegmentLogicalTypeMemberId 

Member ID

kLogicalSegmentLogicalTypeConnectionPoint 

Connection Point

kLogicalSegmentLogicalTypeAttributeId 

Attribute ID

kLogicalSegmentLogicalTypeSpecial 

Special

kLogicalSegmentLogicalTypeServiceId 

Service ID

kLogicalSegmentLogicalTypeExtendedLogical 

Extended Logical

Definition at line 77 of file cipepath.h.

All types of network segment types for the use in all code.

Enum constants for the different network segment subtypes to decouple code from the actual needed message values

Enumerator
kNetworkSegmentSubtypeReserved 

Reserverd

kNetworkSegmentSubtypeScheduleSegment 

Schedule segment

kNetworkSegmentSubtypeFixedTagSegment 

Fixed tag segment

kNetworkSegmentSubtypeProductionInhibitTimeInMilliseconds 

Production Inhibit Time in milliseconds segment

kNetworkSegmentSubtypeSafetySegment 

Safety segment

kNetworkSegmentSubtypeProductionInhibitTimeInMicroseconds 

Production Inhibit Time in microseconds segment

kNetworkSegmentSubtypeExtendedNetworkSegment 

Extended network segment

Definition at line 123 of file cipepath.h.

Port Segment flags.

Enumerator
kPortSegmentFlagExtendedLinkAddressSize 

Extended Link Address Size flag, Port segment

Definition at line 72 of file cipepath.h.

Segment type Enum.

Bits 7-5 in the Segment Type/Format byte

Enumerator
kSegmentTypePortSegment 

Port segment

kSegmentTypeLogicalSegment 

Logical segment

kSegmentTypeNetworkSegment 

Network segment

kSegmentTypeSymbolicSegment 

Symbolic segment

kSegmentTypeDataSegment 

Data segment

kSegmentTypeDataTypeConstructed 

Data type constructed

kSegmentTypeDataTypeElementary 

Data type elementary

kSegmentTypeReserved 

Reserved segment type

Definition at line 59 of file cipepath.h.

Extended symbolic symbol formats.

Enumerator
kSymbolicSegmentExtendedFormatDoubleByteChars 

Double byte character encoding

kSymbolicSegmentExtendedFormatTripleByteChars 

Triple byte character encoding

kSymbolicSegmentExtendedFormatNumericSymbolUSINT 

Numeric USINT symbol

kSymbolicSegmentExtendedFormatNumericSymbolUINT 

Numeric UINT symbol

kSymbolicSegmentExtendedFormatNumericSymbolUDINT 

Numeric UDINT symbol

kSymbolicSegmentExtendedFormatReserved 

Reserved

Definition at line 153 of file cipepath.h.

Symbolic segment formats.

Enumerator
kSymbolicSegmentFormatASCII 

ASCII format

kSymbolicSegmentFormatExtendedString 

Extended String format

Definition at line 145 of file cipepath.h.

Function Documentation

size_t CipEpathEncodeConnectionEpath ( const CipConnectionPathEpath *const  connection_epath,
CipOctet **  encoded_path 
)
bool CipEpathEqual ( const CipOctet *const  path1,
const CipUint  path1_length,
const CipOctet *const  path2,
const CipUint  path2_length 
)

Definition at line 697 of file cipepath.c.

const CipDword CipEpathGetLogicalValue ( const EipUint8 **  message)

Definition at line 332 of file cipepath.c.

References GetDintFromMessage(), GetIntFromMessage(), GetPathLogicalSegmentLogicalFormat(), GetSintFromMessage(), kLogicalSegmentLogicalFormatEightBit, kLogicalSegmentLogicalFormatSixteenBit, kLogicalSegmentLogicalFormatThirtyTwoBit, MoveMessageNOctets(), and OPENER_ASSERT.

Referenced by ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t CipEpathSetLogicalValue ( const CipDword  logical_value,
const LogicalSegmentLogicalFormat  logical_format,
CipOctet **  message 
)

Definition at line 356 of file cipepath.c.

References AddDintToMessage(), AddIntToMessage(), AddSintToMessage(), kLogicalSegmentLogicalFormatEightBit, kLogicalSegmentLogicalFormatSixteenBit, kLogicalSegmentLogicalFormatThirtyTwoBit, MoveMessageNOctets(), and OPENER_ASSERT.

Referenced by CipEpathEncodeConnectionEpath().

Here is the call graph for this function:

Here is the caller graph for this function:

void GetElectronicKeyFormat4FromMessage ( const CipOctet **const  cip_path,
ElectronicKeyFormat4 key 
)

Gets the data for an Electronic Key of format 4 from the EPath message.

Parameters
cip_pathThe start of the EPath message
keyWrites the data on the user provided data electronic key struct

Definition at line 441 of file cipepath.c.

References ElectronicKeyFormat4SetDeviceType(), ElectronicKeyFormat4SetMajorRevisionCompatibility(), ElectronicKeyFormat4SetMinorRevision(), ElectronicKeyFormat4SetProductCode(), ElectronicKeyFormat4SetVendorId(), GetIntFromMessage(), GetPathLogicalSegmentElectronicKeyFormat(), GetSintFromMessage(), kElectronicKeySegmentFormatKeyFormat4, MoveMessageNOctets(), and OPENER_ASSERT.

Referenced by ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

CipUsint GetPathDataSegmentSimpleDataWordLength ( const unsigned char *const  cip_path)

Gets the data word length of a Simple Data segment.

Parameters
cip_pathThe start of the EPath message
Returns
The length in words of the Simple Data segment

Gets the data word length of a Simple Data segment.

Parameters
cip_pathPointer to the start of the EPath message
Returns
The amount of 16-bit words of data in the EPath

Definition at line 616 of file cipepath.c.

References GetPathDataSegmentSubtype(), GetPathSegmentType(), GetSintFromMessage(), kDataSegmentSubtypeSimpleData, kSegmentTypeDataSegment, and OPENER_ASSERT.

Here is the call graph for this function:

DataSegmentSubtype GetPathDataSegmentSubtype ( const unsigned char *const  cip_path)

Gets the Data Segment subtype of a Data Segment EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The Data Segment subtype

Definition at line 595 of file cipepath.c.

References DATA_SEGMENT_SUBTYPE_ANSI_EXTENDED_SYMBOL, DATA_SEGMENT_SUBTYPE_SIMPLE_DATA, kDataSegmentSubtypeANSIExtendedSymbol, kDataSegmentSubtypeReserved, and kDataSegmentSubtypeSimpleData.

Referenced by GetPathDataSegmentSimpleDataWordLength(), and ParseConnectionPath().

Here is the caller graph for this function:

ElectronicKeySegmentFormat GetPathLogicalSegmentElectronicKeyFormat ( const unsigned char *const  cip_path)

Gets the Electronic Key format of a Logical Segment Special Type EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The Electronic Key Format used in the EPath

Definition at line 426 of file cipepath.c.

References ELECTRONIC_KEY_SEGMENT_KEY_FORMAT_4, GetPathLogicalSegmentSpecialTypeLogicalType(), kElectronicKeySegmentFormatKeyFormat4, kElectronicKeySegmentFormatReserved, kLogicalSegmentSpecialTypeLogicalFormatElectronicKey, and OPENER_ASSERT.

Referenced by GetElectronicKeyFormat4FromMessage(), and ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

LogicalSegmentLogicalFormat GetPathLogicalSegmentLogicalFormat ( const unsigned char *const  cip_path)

Gets the Logical Format of a Logical Segment EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The logical format of the logical format

Definition at line 287 of file cipepath.c.

References GetPathSegmentType(), kLogicalSegmentLogicalFormatEightBit, kLogicalSegmentLogicalFormatSixteenBit, kLogicalSegmentLogicalFormatThirtyTwoBit, kSegmentTypeLogicalSegment, LOGICAL_SEGMENT_FORMAT_EIGHT_BIT, LOGICAL_SEGMENT_FORMAT_SIXTEEN_BIT, LOGICAL_SEGMENT_FORMAT_THIRTY_TWO_BIT, and OPENER_ASSERT.

Referenced by CipEpathGetLogicalValue().

Here is the call graph for this function:

Here is the caller graph for this function:

LogicalSegmentLogicalType GetPathLogicalSegmentLogicalType ( const unsigned char *const  cip_path)

Gets the Logical Type of an EPath Logical Segment message.

Parameters
cip_pathThe start of the EPath message
Returns
The logical type of the logical segment

Definition at line 213 of file cipepath.c.

References GetPathSegmentType(), kLogicalSegmentLogicalTypeAttributeId, kLogicalSegmentLogicalTypeClassId, kLogicalSegmentLogicalTypeConnectionPoint, kLogicalSegmentLogicalTypeExtendedLogical, kLogicalSegmentLogicalTypeInstanceId, kLogicalSegmentLogicalTypeMemberId, kLogicalSegmentLogicalTypeServiceId, kLogicalSegmentLogicalTypeSpecial, kSegmentTypeLogicalSegment, LOGICAL_SEGMENT_TYPE_ATTRIBUTE_ID, LOGICAL_SEGMENT_TYPE_CLASS_ID, LOGICAL_SEGMENT_TYPE_CONNECTION_POINT, LOGICAL_SEGMENT_TYPE_EXTENDED_LOGICAL, LOGICAL_SEGMENT_TYPE_INSTANCE_ID, LOGICAL_SEGMENT_TYPE_MEMBER_ID, LOGICAL_SEGMENT_TYPE_SERVICE_ID, LOGICAL_SEGMENT_TYPE_SPECIAL, and OPENER_ASSERT.

Referenced by GetPathLogicalSegmentExtendedLogicalType(), GetPathLogicalSegmentSpecialTypeLogicalType(), and ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

LogicalSegmentSpecialTypeLogicalFormat GetPathLogicalSegmentSpecialTypeLogicalType ( const unsigned char *const  cip_path)

Gets the Special Type Logical Type of a Logical Segment EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The Special Type Logical Format subtype of a Logical Segment EPath message

Definition at line 407 of file cipepath.c.

References GetPathLogicalSegmentLogicalType(), GetPathSegmentType(), kLogicalSegmentLogicalTypeSpecial, kLogicalSegmentSpecialTypeLogicalFormatElectronicKey, kLogicalSegmentSpecialTypeLogicalFormatReserved, kSegmentTypeLogicalSegment, LOGICAL_SEGMENT_SPECIAL_TYPE_FORMAT_ELECTRONIC_KEY, and OPENER_ASSERT.

Referenced by GetPathLogicalSegmentElectronicKeyFormat(), and ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

CipUdint GetPathNetworkSegmentProductionInhibitTimeInMicroseconds ( const unsigned char *const  cip_path)

Gets the Production Inhibit Time in Microseconds.

Parameters
cip_pathThe start of the EPath message
Returns
The production Inhibit Time in Microseconds

Gets the Production Inhibit Time in Microseconds.

Parameters
cip_pathPointer to the start of the EPath message
Returns
the Production Inhibit Time in microseconds ranging from 0 to 4294967295

Definition at line 514 of file cipepath.c.

References GetDintFromMessage(), GetPathNetworkSegmentSubtype(), GetPathSegmentType(), kNetworkSegmentSubtypeProductionInhibitTimeInMicroseconds, kSegmentTypeNetworkSegment, and OPENER_ASSERT.

Here is the call graph for this function:

CipUsint GetPathNetworkSegmentProductionInhibitTimeInMilliseconds ( const unsigned char *const  cip_path)

Gets the Production Inhibit Time in Milliseconds.

Parameters
cip_pathThe start of the EPath message
Returns
The production Inhibit Time in Milliseconds

Gets the Production Inhibit Time in Milliseconds.

Parameters
cip_pathPointer to the start of the EPath message
Returns
the Production Inhibit Time in milliseconds ranging from 0 to 255

Definition at line 497 of file cipepath.c.

References GetPathNetworkSegmentSubtype(), GetPathSegmentType(), kNetworkSegmentSubtypeProductionInhibitTimeInMilliseconds, kSegmentTypeNetworkSegment, and OPENER_ASSERT.

Here is the call graph for this function:

NetworkSegmentSubtype GetPathNetworkSegmentSubtype ( const unsigned char *const  cip_path)

Gets the Network Segment Subtype of a EPatch Network Segement EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
Network Segment subtype

Gets the Network Segment Subtype of a EPatch Network Segement EPath message.

Parameters
cip_pathPointer to the start of the EPath message
Returns
The Network Segment subtype of the EPath

Definition at line 466 of file cipepath.c.

References GetPathSegmentType(), kNetworkSegmentSubtypeExtendedNetworkSegment, kNetworkSegmentSubtypeFixedTagSegment, kNetworkSegmentSubtypeProductionInhibitTimeInMicroseconds, kNetworkSegmentSubtypeProductionInhibitTimeInMilliseconds, kNetworkSegmentSubtypeReserved, kNetworkSegmentSubtypeSafetySegment, kNetworkSegmentSubtypeScheduleSegment, kSegmentTypeNetworkSegment, NETWORK_SEGMENT_EXTENDED_NETWORK, NETWORK_SEGMENT_FIXED_TAG, NETWORK_SEGMENT_PRODUCTION_INHIBIT_TIME_IN_MICROSECONDS, NETWORK_SEGMENT_PRODUCTION_INHIBIT_TIME_IN_MILLISECONDS, NETWORK_SEGMENT_SAFETY, NETWORK_SEGMENT_SCHEDULE, and OPENER_ASSERT.

Referenced by GetPathNetworkSegmentProductionInhibitTimeInMicroseconds(), GetPathNetworkSegmentProductionInhibitTimeInMilliseconds(), and ParseConnectionPath().

Here is the call graph for this function:

Here is the caller graph for this function:

bool GetPathPortSegmentExtendedLinkAddressSizeBit ( const unsigned char *const  cip_path)

Only to be used on Port Segments. Returns if the Port Segment has the extended link address size bit set.

Parameters
cip_pathThe start of the EPath message
Returns
True if extended link addres size bit set, false otherwise

Definition at line 148 of file cipepath.c.

Referenced by GetPathPortSegmentExtendedPortNumber(), GetPathPortSegmentLinkAddressSize(), and SetPathPortSegmentExtendedPortIdentifier().

Here is the caller graph for this function:

unsigned int GetPathPortSegmentExtendedPortNumber ( const unsigned char *const  cip_path)

Only to be used on Port Segments with Extended Port Number. Gets the Extended Port Number.

Parameters
cip_pathThe start of the EPath message
Returns
The Link Address Size

Definition at line 186 of file cipepath.c.

References GetPathPortSegmentExtendedLinkAddressSizeBit(), GetPathPortSegmentPortIdentifier(), kPortSegmentExtendedPort, and OPENER_ASSERT.

Here is the call graph for this function:

unsigned int GetPathPortSegmentLinkAddressSize ( const unsigned char *const  cip_path)

Only to be used on Port Segments. Gets the Link Address Size.

Parameters
cip_pathThe start of the EPath message
Returns
The Link Address Size

Definition at line 177 of file cipepath.c.

References GetPathPortSegmentExtendedLinkAddressSizeBit(), and OPENER_ASSERT.

Here is the call graph for this function:

unsigned int GetPathPortSegmentPortIdentifier ( const unsigned char *const  cip_path)

Only to be used on Port Segments. Returns the Port Identifier.

Parameters
cip_pathThe start of the EPath message
Returns
The Port Identifier

Definition at line 158 of file cipepath.c.

References GetPathSegmentType(), kSegmentTypePortSegment, and OPENER_ASSERT.

Referenced by GetPathPortSegmentExtendedPortNumber().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolicSegmentExtendedFormat GetPathSymbolicSegmentExtendedFormat ( const unsigned char *const  cip_path)

Gets the Extended Format subtype of a Symbolic Segment EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
Symbolic Segment Extended Format

Definition at line 570 of file cipepath.c.

References GetPathSegmentType(), GetPathSymbolicSegmentFormat(), GetPathSymbolicSegmentNumericType(), kSegmentTypeSymbolicSegment, kSymbolicSegmentExtendedFormatDoubleByteChars, kSymbolicSegmentExtendedFormatReserved, kSymbolicSegmentExtendedFormatTripleByteChars, kSymbolicSegmentFormatExtendedString, OPENER_ASSERT, SYMBOLIC_SEGMENT_EXTENDED_FORMAT_DOUBLE_CHAR, SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC, and SYMBOLIC_SEGMENT_EXTENDED_FORMAT_TRIPLE_CHAR.

Here is the call graph for this function:

SymbolicSegmentFormat GetPathSymbolicSegmentFormat ( const unsigned char *const  cip_path)

Gets the Symbolic Segment Format of the Symbolic Segment EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The Symbolic Segment Format

Definition at line 534 of file cipepath.c.

References kSymbolicSegmentFormatASCII, kSymbolicSegmentFormatExtendedString, and SYMBOLIC_SEGMENT_FORMAT_EXTENDED_STRING.

Referenced by GetPathSymbolicSegmentExtendedFormat().

Here is the caller graph for this function:

SymbolicSegmentExtendedFormat GetPathSymbolicSegmentNumericType ( const unsigned char *const  cip_path)

Gets the Numeric subtype of a Symbolic Segment Extended Format EPath message.

Parameters
cip_pathThe start of the EPath message
Returns
The Numeric Extended Format subtype

Definition at line 552 of file cipepath.c.

References kSymbolicSegmentExtendedFormatNumericSymbolUDINT, kSymbolicSegmentExtendedFormatNumericSymbolUINT, kSymbolicSegmentExtendedFormatNumericSymbolUSINT, kSymbolicSegmentExtendedFormatReserved, SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_UDINT_TYPE, SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_UINT_TYPE, and SYMBOLIC_SEGMENT_EXTENDED_FORMAT_NUMERIC_USINT_TYPE.

Referenced by GetPathSymbolicSegmentExtendedFormat().

Here is the caller graph for this function:

void SetPathLogicalSegmentLogicalFormat ( LogicalSegmentLogicalFormat  format,
CipOctet *const  cip_path 
)

Definition at line 311 of file cipepath.c.

References GetPathSegmentType(), kLogicalSegmentLogicalFormatEightBit, kLogicalSegmentLogicalFormatSixteenBit, kLogicalSegmentLogicalFormatThirtyTwoBit, kSegmentTypeLogicalSegment, LOGICAL_SEGMENT_FORMAT_EIGHT_BIT, LOGICAL_SEGMENT_FORMAT_SIXTEEN_BIT, LOGICAL_SEGMENT_FORMAT_THIRTY_TWO_BIT, and OPENER_ASSERT.

Referenced by CipEpathEncodeConnectionEpath().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetPathLogicalSegmentLogicalType ( LogicalSegmentLogicalType  logical_type,
CipOctet *const  cip_path 
)
void SetPathPortSegmentExtendedPortIdentifier ( const unsigned int  extended_port_identifier,
CipOctet *const  cip_path 
)

Sets the Extended Port Identifier in a EPath Port Segment message.

Parameters
extended_port_identifierThe extended port identifier to be encoded into the message
cip_pathThe start for the EPatch message

Definition at line 198 of file cipepath.c.

References GetPathPortSegmentExtendedLinkAddressSizeBit(), kPortSegmentExtendedPort, and SetPathPortSegmentPortIdentifier().

Here is the call graph for this function:

void SetPathPortSegmentPortIdentifier ( const unsigned int  port_identifier,
unsigned char *const  cip_path 
)

Sets the Port Identifier form an Port Segment EPath to be sent.

Parameters
port_identifierThe port identifier
cip_pathA message buffer - Will be written on!

Definition at line 168 of file cipepath.c.

References OPENER_ASSERT.

Referenced by SetPathPortSegmentExtendedPortIdentifier().

Here is the caller graph for this function:

void SetPathSegmentType ( SegmentType  segment_type,
unsigned char *const  cip_path 
)

Sets the basic segment type of an CIP EPath to be sent.

Parameters
segment_typeThe segment type
cip_pathA message buffer - Will be written on!

Definition at line 113 of file cipepath.c.

References kSegmentTypeDataSegment, kSegmentTypeDataTypeConstructed, kSegmentTypeDataTypeElementary, kSegmentTypeLogicalSegment, kSegmentTypeNetworkSegment, kSegmentTypePortSegment, kSegmentTypeReserved, kSegmentTypeSymbolicSegment, OPENER_ASSERT, SEGMENT_TYPE_DATA_SEGMENT, SEGMENT_TYPE_DATA_TYPE_CONSTRUCTED, SEGMENT_TYPE_DATA_TYPE_ELEMENTARTY, SEGMENT_TYPE_LOGICAL_SEGMENT, SEGMENT_TYPE_NETWORK_SEGMENT, SEGMENT_TYPE_PORT_SEGMENT, SEGMENT_TYPE_SEGMENT_RESERVED, and SEGMENT_TYPE_SYMBOLIC_SEGMENT.

Referenced by CipEpathEncodeConnectionEpath().

Here is the caller graph for this function: