|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Classes | |
| class | DCPDeviceDescription |
| Parsed PROFINET device information from a DCP response. More... | |
| struct | DCPDHCPBlock |
| Parsed DHCP block from a DCP response. More... | |
| class | DcpWireFormatTest |
| Test fixture for DCP request wire-format serialization. More... | |
Typedefs | |
| using | BlockKey = DcpBlockKey |
| (option, suboption) key identifying a DCP block. | |
| using | ResponseMap = std::map< MacAddress, std::map< BlockKey, std::vector< std::uint8_t > > > |
| Result of ReadResponse(): MAC address -> parsed (option,suboption) -> payload blocks. | |
Functions | |
| std::vector< std::string > | DecodeDeviceRole (std::uint8_t roleByte) |
| Decode a device role bitmask into a list of role names. | |
| std::string | DeviceRoleName (DcpDeviceRole role) |
| Get the human-readable name of a DCP device role. | |
| std::string | GetBlockName (std::uint16_t option, std::uint8_t suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, std::uint8_t suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, DcpIpSuboption suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, DcpDeviceSuboption suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, DcpControlSuboption suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, DcpDhcpSuboption suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| std::string | GetBlockName (DcpOption option, DcpDeviceInitiativeSuboption suboption) |
| Get the human-readable name for a (option, suboption) DCP block. | |
| DcpBlockError | ParseSetResponse (const Bytes &data) |
| Parses the raw byte response payload received from a SET operation. | |
| DcpBlockError | RecvSetResponse (IRawEthernetSocket &sock, const MacAddress &srcMac, int timeoutSec) |
| Receive and parse a DCP SET response, filtering out unrelated frames. | |
| std::string | GetDeviceInitiativeName (DcpDeviceInitiative value) |
| std::string | GetDcpResponseCodeName (DcpResponseCode value) |
| Get the human-readable name for a device-response value. | |
| std::string | GetResetQualifierName (std::uint16_t qualifier) |
| Get the human-readable name for a reset qualifier value. | |
| std::string | GetResetQualifierName (DcpResetQualifier qualifier) |
| Get the human-readable name for a reset qualifier value. | |
| std::string | GetIPBlockInfoName (DcpIpBlockInfo info) |
| Get the human-readable name for an IP block info value. | |
| bool | HasConflict (DcpIpBlockInfo info) |
| Whether an address conflict was detected. | |
| bool | IsDhcp (DcpIpBlockInfo info) |
| Whether the address was assigned via DHCP. | |
| std::string | GetDcpBlockQualifierDescription (DcpBlockQualifier qualifier) |
| Get the human-readable description of a DCP block qualifier. | |
| std::string | GetDcpBlockErrorDescription (DcpBlockError error) |
| Get the human-readable name for a DCP SET block-level error code. | |
| constexpr DcpBlockKey | MakeBlockKey (std::uint16_t option, std::uint8_t suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, std::uint8_t suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, DcpIpSuboption suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, DcpDeviceSuboption suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, DcpControlSuboption suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, DcpDhcpSuboption suboption) |
| constexpr DcpBlockKey | MakeBlockKey (DcpOption option, DcpDeviceInitiativeSuboption suboption) |
| Bytes | BuildSetParamRequest (const MacAddress &dst, const MacAddress &src, const std::string ¶m, const std::string &value, bool permanent) |
| Build a serialized DCP SET request for a named parameter. | |
| Bytes | BuildDcpSignalRequest (const MacAddress &dst, const MacAddress &src) |
| Build a serialized DCP Signal request. | |
| const std::map< std::string, BlockKey > & | Params () |
| Table of supported parameter names, mapping to their (option, suboption). | |
| std::optional< std::vector< std::uint8_t > > | GetParam (IRawEthernetSocket &sock, const MacAddress &src, const std::string &target, const std::string ¶m, int timeoutSec=DEFAULT_TIMEOUT) |
| Read a named parameter from a device. | |
| bool | SetParam (IRawEthernetSocket &sock, const MacAddress &src, const std::string &target, const std::string ¶m, const std::string &value, int timeoutSec=DEFAULT_TIMEOUT, bool permanent=false, int threadSleepMs=DEFAULT_THREAD_SLEEP_MS) |
| Write a named parameter to a device. | |
| bool | SetIp (IRawEthernetSocket &sock, const MacAddress &src, const std::string &target, const std::string &ip, const std::string &netmask, const std::string &gateway, bool permanent=false, int timeoutSec=DEFAULT_TIMEOUT, int threadSleepMs=DEFAULT_THREAD_SLEEP_MS) |
| Set a device's IP configuration via DCP. | |
| void | SendDiscover (IRawEthernetSocket &sock, const MacAddress &src, std::uint16_t responseDelay=DEFAULT_RESPONSE_DELAY_FACTOR) |
| Send a DCP Identify multicast request to discover all devices on the segment. | |
| void | SendRequest (IRawEthernetSocket &sock, const MacAddress &src, BlockKey blockType, const std::vector< std::uint8_t > &value) |
| Send a DCP Identify request filtered to a specific (option, suboption). | |
| ResponseMap | ReadResponse (IRawEthernetSocket &sock, const MacAddress &myMac, double timeoutSec=DEFAULT_RESPONSE_TIMEOUT, bool once=false, std::optional< std::uint32_t > expectedXid=std::nullopt) |
| Read and parse DCP Identify responses. | |
| void | SendHello (IRawEthernetSocket &sock, const MacAddress &src, const std::string &stationName, const std::string &ip="0.0.0.0", const std::string &netmask="0.0.0.0", const std::string &gateway="0.0.0.0", std::pair< std::uint16_t, std::uint16_t > deviceId={0, 0}, DcpDeviceRole deviceRole=DcpDeviceRole::IoDevice) |
| Send a DCP Hello multicast announcement (device self-announce after power-on). | |
| std::vector< DCPDeviceDescription > | ReceiveHello (IRawEthernetSocket &sock, const MacAddress &myMac, double timeoutSec=DEFAULT_HELLO_TIMEOUT, const std::function< void(const DCPDeviceDescription &)> &callback=nullptr) |
| Listen for DCP Hello announcements from other devices. | |
| bool | SignalDevice (IRawEthernetSocket &sock, const MacAddress &src, const std::string &target, int durationMs=FLASH_DURATION_MS, double timeoutSec=DEFAULT_TIMEOUT) |
| Flash a device's identification LEDs. | |
| bool | ResetToFactory (IRawEthernetSocket &sock, const MacAddress &src, const std::string &target, DcpResetMode mode=DcpResetMode::Communication, double timeoutSec=DEFAULT_TIMEOUT) |
| Reset a device to factory defaults. | |
| std::string | GetSuboptionName (std::uint16_t option, std::uint8_t value) |
| void | SendRequest (IRawEthernetSocket &sock, const MacAddress &src, BlockKey blockType, const Bytes &value) |
| Send a DCP Identify request filtered to a specific (option, suboption). | |
| TEST (DcpTest, DecodeDeviceRoleUnknown) | |
| TEST (DcpTest, DecodeDeviceRoleIoDevice) | |
| TEST (DcpTest, DecodeDeviceRoleIoController) | |
| TEST (DcpTest, DecodeDeviceRoleIoMultidevice) | |
| TEST (DcpTest, DecodeDeviceRolePnSupervisor) | |
| TEST (DcpTest, DecodeDeviceRoleAllRoles) | |
| TEST (DcpTest, GetBlockNameKnownOptionAndSuboption) | |
| TEST (DcpTest, GetBlockNameKnownDeviceAndDhcpSuboptions) | |
| TEST (DcpTest, GetBlockNameKnownControlAndDeviceInitiativeSuboptions) | |
| TEST (DcpTest, GetBlockNameKnownOptionUnknownSuboption) | |
| TEST (DcpTest, GetBlockNameKnownOptionWithoutSuboptionTable) | |
| TEST (DcpTest, GetBlockNameVendorOption) | |
| TEST (DcpTest, GetBlockNameUnknownOption) | |
| TEST (DcpTest, IpBlockInfoGetNameDefinedValues) | |
| TEST (DcpTest, IpBlockInfoGetNameUnknown) | |
| TEST (DcpTest, IpBlockInfoHasConflict) | |
| TEST (DcpTest, IpBlockInfoIsDhcp) | |
| TEST (DcpTest, BlockQualifierGetNameTemporary) | |
| TEST (DcpTest, BlockQualifierGetNamePermanent) | |
| TEST (DcpTest, BlockQualifierGetNameUnknown) | |
| TEST (DcpTest, ResetQualifierApplicationData) | |
| TEST (DcpTest, ResetQualifierCommunicationParameter) | |
| TEST (DcpTest, ResetQualifierEngineeringParameter) | |
| TEST (DcpTest, ResetQualifierAllStoredData) | |
| TEST (DcpTest, ResetQualifierEngineeringParameterSecondRange) | |
| TEST (DcpTest, ResetQualifierFactory) | |
| TEST (DcpTest, ResetQualifierRestoreData) | |
| TEST (DcpTest, ResetQualifierUnknown) | |
| TEST (DcpTest, DeviceInitiativeNoHello) | |
| TEST (DcpTest, DeviceInitiativeIssueHello) | |
| TEST (DcpTest, DeviceInitiativeUnknown) | |
| TEST (DcpTest, DcpResponseCodeGetNameDefinedValues) | |
| TEST (DcpTest, DcpResponseCodeGetNameUnknown) | |
| TEST (DcpTest, GetDcpBlockErrorNameDefinedValues) | |
| TEST (DcpTest, GetDcpBlockErrorNameUnknown) | |
| TEST (DcpTest, DcpDhcpBlockParseHostname) | |
| TEST (DcpTest, DcpDhcpBlockParseClientId) | |
| TEST (DcpTest, DcpDhcpBlockParseVendorSpecific) | |
| TEST (DcpTest, DcpDhcpBlockParseFqdn) | |
| TEST (DcpTest, DcpDhcpBlockParseUuid) | |
| TEST (DcpTest, DcpDhcpBlockParseUuidTooShort) | |
| TEST (DcpTest, DcpDhcpBlockParseUuidMinimumLength) | |
| TEST (DcpTest, DcpDhcpBlockParseUnknownSuboption) | |
| TEST (DcpTest, DcpDhcpBlockParseUnknownSuboptionEmptyPayload) | |
| TEST (DcpTest, DcpDhcpBlockKnownSuboptionNames) | |
| TEST (DcpTest, ParseSetResponseRejectsTooShortFrame) | |
| TEST (DcpTest, ParseSetResponseRejectsMalformedEthernetHeader) | |
| TEST (DcpTest, ParseSetResponseRejectsShortVlanFrame) | |
| TEST (DcpTest, ParseSetResponseAcceptsVlanFrame) | |
| TEST (DcpTest, ParseSetResponseRejectsUnexpectedVlanInnerEtherType) | |
| TEST (DcpTest, ParseSetResponseRejectsUnexpectedEtherType) | |
| TEST (DcpTest, ParseSetResponseRejectsMalformedDcpHeader) | |
| TEST (DcpTest, ParseSetResponseRejectsUnsupportedService) | |
| TEST (DcpTest, ParseSetResponseRejectsUnexpectedService) | |
| TEST (DcpTest, ParseSetResponseWithoutResponseBlockReturnsSuccess) | |
| TEST (DcpTest, ParseSetResponseExtractsThreeByteBlockError) | |
| TEST (DcpTest, ParseSetResponseExtractsShortBlockError) | |
| TEST (DcpTest, ParseSetResponseEmptyResponseBlockReturnsSuccess) | |
| TEST (DcpTest, ParseSetResponseSkipsNonResponseBlocks) | |
| TEST (DcpTest, ParseSetResponseUsesFirstResponseBlock) | |
| TEST (DcpTest, RecvSetResponseReturnsSuccessfulResponse) | |
| TEST (DcpTest, RecvSetResponseIgnoresEmptyFrame) | |
| TEST (DcpTest, RecvSetResponseIgnoresShortFrame) | |
| TEST (DcpTest, RecvSetResponseIgnoresMalformedEthernetFrame) | |
| TEST (DcpTest, RecvSetResponseIgnoresWrongDestinationMac) | |
| TEST (DcpTest, RecvSetResponseIgnoresShortVlanPayload) | |
| TEST (DcpTest, RecvSetResponseIgnoresWrongVlanInnerEtherType) | |
| TEST (DcpTest, RecvSetResponseIgnoresWrongEtherType) | |
| TEST (DcpTest, RecvSetResponseAcceptsVlanResponse) | |
| TEST (DcpTest, RecvSetResponseIgnoresUnexpectedServiceType) | |
| TEST (DcpTest, RecvSetResponsePropagatesDcpError) | |
| TEST (DcpTest, RecvSetResponseReturnsBlockError) | |
| TEST (DcpTest, RecvSetResponseTimesOut) | |
| TEST (DcpTest, DeviceRoleNameDefinedValues) | |
| TEST (DcpTest, DeviceRoleNameUnknown) | |
| TEST (DcpTest, GetBlockNameUnknownSuboptionForAllTypedOptionGroups) | |
| TEST (DcpTest, GetBlockNameOptionsWithoutSuboptions) | |
| TEST (DcpTest, GetBlockNameUint16OptionOverload) | |
| TEST (DcpTest, GetBlockNameDeviceInitiativeSuboption) | |
| TEST (DcpTest, MakeBlockKeyRawOption) | |
| TEST (DcpTest, MakeBlockKeyGenericSuboption) | |
| TEST (DcpTest, MakeBlockKeyIpSuboption) | |
| TEST (DcpTest, MakeBlockKeyDeviceSuboption) | |
| TEST (DcpTest, MakeBlockKeyControlSuboption) | |
| TEST (DcpTest, MakeBlockKeyDhcpSuboption) | |
| TEST (DcpTest, MakeBlockKeyDeviceInitiativeSuboption) | |
| TEST (DcpTest, DeviceRoleBitwiseOr) | |
| TEST (DcpTest, DeviceRoleBitwiseAndPresent) | |
| TEST (DcpTest, DeviceRoleBitwiseAndAbsent) | |
| TEST (DcpTest, ResetModeBitwiseOr) | |
| TEST (DcpTest, ResetModeBitwiseAndPresent) | |
| TEST (DcpTest, ResetModeBitwiseAndAbsent) | |
| TEST (DcpTest, IpBlockInfoBitHelpersHandleUnknownCombinations) | |
| TEST (DcpTest, ResetQualifierUnknownEnumValue) | |
| TEST (DcpTest, ResetQualifierZeroIsUnknown) | |
| TEST (DcpTest, DcpDhcpBlockParseUnknownEnumValue) | |
| TEST (DcpTest, DcpDhcpBlockParseEmptyHostname) | |
| TEST (DcpTest, DcpDhcpBlockParseEmptyFqdn) | |
| TEST (DCPDeviceDescriptionTest, ToStringIncludesAllPopulatedFields) | |
| TEST (DCPDeviceDescriptionTest, ToStringOmitsUnsetOptionalFields) | |
| TEST (DCPDeviceDescriptionTest, ToStringFormatsDhcpBlockVariants) | |
| TEST (DCPDeviceDescriptionTest, ConstructorDecodesAllSupportedBlocks) | |
| TEST (DCPDeviceDescriptionTest, ConstructorIgnoresIncompleteOptionalBlocks) | |
| TEST (DCPDeviceDescriptionTest, ConstructorHandlesLegacyTwelveByteIpBlock) | |
| TEST (DCPDeviceDescriptionTest, ConstructorUsesLegacyIpLayoutForThirteenByteBlock) | |
| TEST (DcpTest, BuildSetParamRequestBuildsTemporaryOddLengthName) | |
| TEST (DcpTest, BuildSetParamRequestBuildsPermanentEvenLengthName) | |
| TEST (DcpTest, BuildSetParamRequestRejectsIpParameter) | |
| TEST (DcpTest, BuildSetParamRequestRejectsUnknownParameter) | |
| TEST (DcpTest, BuildSetParamRequestRejectsOverlongStationName) | |
| TEST (DcpTest, BuildSetParamRequestAcceptsMaximumStationName) | |
| TEST (DcpTest, BuildDcpSignalRequestBuildsCorrectWireFormat) | |
| TEST (DcpTest, ParamsContainsSupportedParameters) | |
| TEST (DcpTest, GetParamThrowsForUnknownParameter) | |
| TEST (DcpTest, GetParamReturnsMatchingParameter) | |
| TEST (DcpTest, GetParamReturnsNulloptWhenParameterIsMissing) | |
| TEST (DcpTest, GetParamReturnsNulloptOnTimeout) | |
| TEST (DcpTest, SetParamReturnsTrueForSuccessfulResponse) | |
| TEST (DcpTest, SetParamThrowsForDeviceBlockError) | |
| TEST (DcpTest, SetParamReturnsFalseOnTimeout) | |
| TEST (DcpTest, SetParamBuildsTemporaryRequest) | |
| TEST (DcpTest, SetIpReturnsFalseOnTimeout) | |
| TEST (DcpTest, SetIpRejectsInvalidIpAddress) | |
| TEST (DcpTest, SetIpEncodesPermanentQualifier) | |
| TEST (DcpTest, SetIpEncodesTemporaryQualifier) | |
| TEST (DcpTest, SendRequestBuildsIdentifyRequest) | |
| TEST (DcpTest, SetIpBuildsPermanentIpBlock) | |
| TEST (DcpTest, ReadResponseSetsExpectedSocketTimeout) | |
| TEST (DcpTest, ReadResponseReturnsValidResponse) | |
| TEST (DcpTest, ReadResponseAcceptsAnyXidWhenExpectedXidIsNotSpecified) | |
| TEST (DcpTest, ReadResponseIgnoresUnexpectedXid) | |
| TEST (DcpTest, ReadResponseIgnoresEmptyData) | |
| TEST (DcpTest, ReadResponseIgnoresShortEthernetFrame) | |
| TEST (DcpTest, ReadResponseIgnoresMalformedEthernetFrame) | |
| TEST (DcpTest, ReadResponseIgnoresWrongDestination) | |
| TEST (DcpTest, ReadResponseIgnoresShortVlanPayload) | |
| TEST (DcpTest, ReadResponseIgnoresWrongVlanInnerEtherType) | |
| TEST (DcpTest, ReadResponseIgnoresWrongEtherType) | |
| TEST (DcpTest, ReadResponseIgnoresMalformedDcpHeader) | |
| TEST (DcpTest, ReadResponseIgnoresUnsuccessfulServiceType) | |
| TEST (DcpTest, ReadResponseParsesValidVlanResponse) | |
| TEST (DcpTest, ReadResponseUsesEmptyBlockRegionForShortDcpLength) | |
| TEST (DcpTest, ReadResponseLimitsBlockRegionToDcpLength) | |
| TEST (DcpTest, ReadResponseProcessesMultipleResponsesWhenOnceIsFalse) | |
| TEST (DcpTest, ReadResponseStopsAfterFirstValidResponseWhenOnceIsTrue) | |
| TEST (DcpTest, ReadResponseContinuesAfterIgnoredFrames) | |
| TEST (DcpTest, ReadResponseReturnsEmptyMapOnTimeout) | |
| TEST (DcpTest, SendHelloBuildsCompleteHelloFrame) | |
| TEST (DcpTest, SendHelloAddsPaddingForOddLengthStationName) | |
| TEST (DcpTest, SendHelloEncodesCombinedDeviceRole) | |
| TEST (DcpTest, SendHelloEncodesDeviceId) | |
| TEST (DcpTest, SendHelloRejectsInvalidIpAddress) | |
| TEST (DcpTest, SendHelloRejectsInvalidNetmask) | |
| TEST (DcpTest, SendHelloRejectsInvalidGateway) | |
| TEST (DcpTest, ReceiveHelloSetsExpectedSocketTimeout) | |
| TEST (DcpTest, ReceiveHelloReturnsValidDevice) | |
| TEST (DcpTest, ReceiveHelloInvokesCallbackForValidDevice) | |
| TEST (DcpTest, ReceiveHelloDoesNotInvokeEmptyCallback) | |
| TEST (DcpTest, ReceiveHelloParsesValidVlanHello) | |
| TEST (DcpTest, ReceiveHelloIgnoresEmptyData) | |
| TEST (DcpTest, ReceiveHelloIgnoresShortEthernetFrame) | |
| TEST (DcpTest, ReceiveHelloIgnoresMalformedEthernetFrame) | |
| TEST (DcpTest, ReceiveHelloIgnoresShortVlanPayload) | |
| TEST (DcpTest, ReceiveHelloIgnoresWrongVlanInnerEtherType) | |
| TEST (DcpTest, ReceiveHelloIgnoresWrongEtherType) | |
| TEST (DcpTest, ReceiveHelloIgnoresShortPnioPayload) | |
| TEST (DcpTest, ReceiveHelloIgnoresMalformedDcpHeader) | |
| TEST (DcpTest, ReceiveHelloIgnoresNonHelloServiceId) | |
| TEST (DcpTest, ReceiveHelloIgnoresNonRequestServiceType) | |
| TEST (DcpTest, ReceiveHelloContinuesAfterIgnoredFrame) | |
| TEST (DcpTest, ReceiveHelloReturnsMultipleDevices) | |
| TEST (DcpTest, ReceiveHelloReturnsEmptyOnTimeout) | |
| TEST (DcpTest, SignalDeviceReturnsTrueForSuccessfulResponse) | |
| TEST (DcpTest, SignalDeviceThrowsForBlockError) | |
| TEST (DcpTest, SignalDeviceReturnsFalseOnTimeout) | |
| TEST (DcpTest, SignalDeviceRejectsInvalidTargetMac) | |
| TEST (DcpTest, ResetToFactoryReturnsTrueForSuccessfulResponse) | |
| TEST (DcpTest, ResetToFactoryEncodesCombinedResetMode) | |
| TEST (DcpTest, ResetToFactoryReturnsFalseOnTimeout) | |
| TEST (DcpTest, ResetToFactoryThrowsForBlockError) | |
| TEST (DcpTest, ResetToFactoryRejectsInvalidTargetMac) | |
| TEST (DcpTest, GetParamSendsCorrectGetRequest) | |
| TEST_F (DcpWireFormatTest, OddLengthNameIsPaddedAndBlockLengthExcludesPadding) | |
| TEST_F (DcpWireFormatTest, EvenLengthNameIsNotPadded) | |
| TEST_F (DcpWireFormatTest, DefaultQualifierIsTemporary) | |
| TEST_F (DcpWireFormatTest, PermanentQualifierIsSerialized) | |
| TEST_F (DcpWireFormatTest, IpSetOperationIsRejected) | |
| TEST_F (DcpWireFormatTest, IpParameterMatchingIsCaseInsensitive) | |
| TEST_F (DcpWireFormatTest, SignalUsesFlashOnceValue) | |
Variables | |
| const std::string | DCP_MULTICAST_MAC = "01:0e:cf:00:00:00" |
| DCP Identify/Get/Set multicast destination MAC. | |
| const std::string | DCP_HELLO_MULTICAST_MAC = "01:0e:cf:00:00:01" |
| DCP Hello multicast destination MAC. | |
| constexpr std::size_t | DCP_MAX_NAME_LENGTH = 240 |
| Maximum allowed length in bytes for a station name. | |
| constexpr std::uint16_t | DEFAULT_TIMEOUT = 5 |
| Default timeout. | |
| constexpr std::uint16_t | DEFAULT_THREAD_SLEEP_MS = 2000 |
| constexpr std::uint16_t | DEFAULT_RESPONSE_TIMEOUT = 20 |
| Default response timeout. How long to keep listening for responses. | |
| constexpr std::uint16_t | DEFAULT_HELLO_TIMEOUT = 10 |
| Default HELLO timeout. | |
| constexpr std::uint16_t | DEFAULT_RESPONSE_DELAY_FACTOR = 0x0080 |
| Default dcp response delay factor. | |
| constexpr std::uint16_t | FLASH_DURATION_MS = 3000 |
| Default flash duration of the leds. | |
| constexpr std::uint16_t | blockNameVendorRangeMin = 0x80 |
| Default flash duration of the leds. | |
| constexpr std::uint16_t | blockNameVendorRangeMax = 0xFF |
| Default flash duration of the leds. | |
| constexpr std::uint16_t | DCP_IP_CONFLICT_BIT = 0x0080 |
| Bit mask indicating an IP address conflict. | |
| constexpr std::uint16_t | DCP_IP_DHCP_BIT = 0x0002 |
| Bit mask indicating DHCP bit is set. | |
| using profinet::dcp::BlockKey = typedef DcpBlockKey |
| using profinet::dcp::ResponseMap = typedef std::map<MacAddress, std::map<BlockKey, std::vector<std::uint8_t> >> |
Result of ReadResponse(): MAC address -> parsed (option,suboption) -> payload blocks.
| Bytes profinet::dcp::BuildDcpSignalRequest | ( | const MacAddress & | dst, |
| const MacAddress & | src | ||
| ) |
Build a serialized DCP Signal request.
Creates the complete Ethernet frame used to request the device's identification LEDs to flash once.
The serialized Control/Signal block contains:
| dst | Destination device MAC address. |
| src | Source/controller MAC address. |
Definition at line 937 of file dcp.cpp.
References BuildDcpSignalRequest(), profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, profinet::PNDCPHeader::respDelay, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by BuildDcpSignalRequest(), profinet::dcp::DcpWireFormatTest::BuildSignalRequest(), SignalDevice(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| Bytes profinet::dcp::BuildSetParamRequest | ( | const MacAddress & | dst, |
| const MacAddress & | src, | ||
| const std::string & | param, | ||
| const std::string & | value, | ||
| bool | permanent | ||
| ) |
Build a serialized DCP SET request for a named parameter.
Creates the complete Ethernet frame containing a DCP SET request.
For the NameOfStation parameter, the generated block contains the BlockQualifier followed by the station name. Odd-length values receive one zero padding byte on the wire while the DCP BlockLength excludes that alignment byte.
IP configuration requires the binary IP suite representation (IP address + subnet mask + gateway). The string-valued SET API intentionally rejects IP configuration and callers must use SetIp().
| dst | Destination device MAC address. |
| src | Source/controller MAC address. |
| param | Parameter name, such as "name". |
| value | Parameter value. |
| permanent | Whether the requested value should be stored permanently. |
| DCPError | If the parameter name is unknown. |
| ValidationError | If the parameter value violates DCP constraints. |
Definition at line 883 of file dcp.cpp.
References BuildSetParamRequest(), DCP_MAX_NAME_LENGTH, profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::DcpBlockKey::option, profinet::PNDCPBlockRequest::option, Params(), profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, profinet::PNDCPHeader::respDelay, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::DcpBlockKey::suboption, profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), profinet::ToVec(), and profinet::PNDCPHeader::xId.
Referenced by profinet::dcp::DcpWireFormatTest::BuildSetNameRequest(), BuildSetParamRequest(), SetParam(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::string > profinet::dcp::DecodeDeviceRole | ( | std::uint8_t | roleByte | ) |
Decode a device role bitmask into a list of role names.
| roleByte | Raw device role bitmask byte. |
Definition at line 97 of file dcp.cpp.
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the caller graph for this function:| std::string profinet::dcp::DeviceRoleName | ( | DcpDeviceRole | role | ) |
| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| DcpControlSuboption | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 237 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| DcpDeviceInitiativeSuboption | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 247 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| DcpDeviceSuboption | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 232 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| DcpDhcpSuboption | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 242 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| DcpIpSuboption | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 227 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | DcpOption | option, |
| std::uint8_t | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 222 of file dcp.cpp.
References GetBlockName(), option, and suboption.
Here is the call graph for this function:| std::string profinet::dcp::GetBlockName | ( | std::uint16_t | option, |
| std::uint8_t | suboption | ||
| ) |
Get the human-readable name for a (option, suboption) DCP block.
| option | DCP option code. |
| suboption | DCP suboption code. |
Definition at line 196 of file dcp.cpp.
References blockNameVendorRangeMax, blockNameVendorRangeMin, GetSuboptionName(), profinet::Hex2(), option, suboption, and profinet::Unknown.
Referenced by GetBlockName(), GetBlockName(), GetBlockName(), GetBlockName(), GetBlockName(), GetBlockName(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and profinet::dcp::DCPDeviceDescription::ToString().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetDcpBlockErrorDescription | ( | DcpBlockError | error | ) |
Get the human-readable name for a DCP SET block-level error code.
| error | Block error code. |
Definition at line 524 of file dcp.cpp.
References error, GetDcpBlockErrorDescription(), and profinet::Hex2().
Referenced by GetDcpBlockErrorDescription(), ResetToFactory(), SetIp(), SetParam(), SignalDevice(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetDcpBlockQualifierDescription | ( | DcpBlockQualifier | qualifier | ) |
Get the human-readable description of a DCP block qualifier.
| qualifier | DCP block qualifier. |
Definition at line 434 of file dcp.cpp.
References GetDcpBlockQualifierDescription(), and profinet::Hex4().
Referenced by GetDcpBlockQualifierDescription(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetDcpResponseCodeName | ( | DcpResponseCode | value | ) |
Get the human-readable name for a device-response value.
| value | Device response value. |
Definition at line 501 of file dcp.cpp.
References GetDcpResponseCodeName(), and profinet::Hex2().
Referenced by GetDcpResponseCodeName(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetDeviceInitiativeName | ( | DcpDeviceInitiative | value | ) |
Definition at line 488 of file dcp.cpp.
References GetDeviceInitiativeName(), and profinet::Hex4().
Referenced by GetDeviceInitiativeName(), TEST(), TEST(), TEST(), and profinet::dcp::DCPDeviceDescription::ToString().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetIPBlockInfoName | ( | DcpIpBlockInfo | info | ) |
Get the human-readable name for an IP block info value.
| info | Raw IP block info value. |
Definition at line 402 of file dcp.cpp.
References GetIPBlockInfoName(), and profinet::Hex4().
Referenced by GetIPBlockInfoName(), TEST(), TEST(), and profinet::dcp::DCPDeviceDescription::ToString().
Here is the call graph for this function:
Here is the caller graph for this function:| std::optional< Bytes > profinet::dcp::GetParam | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | target, | ||
| const std::string & | param, | ||
| int | timeoutSec = DEFAULT_TIMEOUT |
||
| ) |
Read a named parameter from a device.
| sock | Bound Ethernet socket to send/receive on. |
| src | Source MAC address to send from. |
| target | Destination device's MAC address, as a string. |
| param | Parameter name ("name" or "ip"); see Params(). |
| timeoutSec | How long to wait for a response. |
Throws DCPError for an unknown parameter name.
Definition at line 1005 of file dcp.cpp.
References profinet::PNDCPHeader::frameId, GetParam(), profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::DcpBlockKey::option, profinet::PNDCPBlockRequest::option, Params(), profinet::PNDCPHeader::payload, ReadResponse(), profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::DcpBlockKey::suboption, profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by GetParam(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetResetQualifierName | ( | DcpResetQualifier | qualifier | ) |
Get the human-readable name for a reset qualifier value.
| qualifier | Raw qualifier value. |
Definition at line 457 of file dcp.cpp.
References GetResetQualifierName(), and profinet::Hex4().
Here is the call graph for this function:| std::string profinet::dcp::GetResetQualifierName | ( | std::uint16_t | qualifier | ) |
Get the human-readable name for a reset qualifier value.
| qualifier | Raw qualifier value. |
Definition at line 447 of file dcp.cpp.
References GetResetQualifierName(), and profinet::Hex4().
Referenced by GetResetQualifierName(), GetResetQualifierName(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string profinet::dcp::GetSuboptionName | ( | std::uint16_t | option, |
| std::uint8_t | value | ||
| ) |
Definition at line 125 of file dcp.cpp.
References profinet::All, profinet::Control, profinet::Device, profinet::DeviceInitiative, profinet::Dhcp, profinet::Hex2(), profinet::Ip, profinet::Nme, option, profinet::Reserved, suboption, and profinet::Unknown.
Referenced by GetBlockName().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::HasConflict | ( | DcpIpBlockInfo | info | ) |
Whether an address conflict was detected.
| info | IP block info value. |
Definition at line 424 of file dcp.cpp.
References DCP_IP_CONFLICT_BIT, and HasConflict().
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), HasConflict(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::IsDhcp | ( | DcpIpBlockInfo | info | ) |
Whether the address was assigned via DHCP.
| info | IP block info value. |
Definition at line 429 of file dcp.cpp.
References DCP_IP_DHCP_BIT, and IsDhcp().
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), IsDhcp(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:
|
constexpr |
Definition at line 251 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 261 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 246 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 256 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 241 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 236 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
|
constexpr |
Definition at line 231 of file dcp.h.
References profinet::DcpBlockKey::option, option, and suboption.
Referenced by profinet::dcp::DCPDeviceDescription::DCPDeviceDescription(), profinet::device::ProfinetScannerTest::CreateScanResponses(), profinet::rpc::GetStationInfo(), profinet::rpc::RpcTests::MakeStationBlocks(), Params(), ReadResponse(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
Here is the caller graph for this function:| const std::map< std::string, BlockKey > & profinet::dcp::Params | ( | ) |
Table of supported parameter names, mapping to their (option, suboption).
Definition at line 590 of file dcp.cpp.
References MakeBlockKey(), and Params().
Referenced by BuildSetParamRequest(), GetParam(), Params(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| DcpBlockError profinet::dcp::ParseSetResponse | ( | const Bytes & | data | ) |
Parses the raw byte response payload received from a SET operation.
| data | Reference to the byte container containing the response payload. |
Parse a DCP SET response and extract the block error code. Throws DCPError on malformed/unexpected frames.
Definition at line 319 of file dcp.cpp.
References profinet::Control, profinet::Hex2(), profinet::Hex4(), profinet::Ok, option, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, payload, profinet::PROFINET_ETHERTYPE, profinet::Response, profinet::ResponseSuccess, profinet::ResponseUnsupported, profinet::PNDCPHeader::serviceType, profinet::wire::Reader::Skip(), suboption, profinet::EthernetHeader::type, profinet::wire::Reader::U16(), and profinet::VLAN_ETHERTYPE.
Referenced by RecvSetResponse(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| ResponseMap profinet::dcp::ReadResponse | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | myMac, | ||
| double | timeoutSec = DEFAULT_RESPONSE_TIMEOUT, |
||
| bool | once = false, |
||
| std::optional< std::uint32_t > | expectedXid = std::nullopt |
||
| ) |
Read and parse DCP Identify responses.
| sock | Bound Ethernet socket to receive on. |
| myMac | This host's MAC address, used to filter responses addressed to us. |
| timeoutSec | How long to keep listening for responses. |
| once | If true, return after the first response. |
| expectedXid | If set, only accept responses matching this transaction ID. |
Definition at line 1218 of file dcp.cpp.
References profinet::EthernetHeader::dst, profinet::PNDCPHeader::length, MakeBlockKey(), option, profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, payload, profinet::PROFINET_ETHERTYPE, ReadResponse(), profinet::IRawEthernetSocket::Recv(), profinet::PNDCPHeader::serviceType, profinet::IRawEthernetSocket::SetTimeout(), profinet::wire::Reader::Skip(), profinet::EthernetHeader::src, suboption, timer, profinet::EthernetHeader::type, profinet::wire::Reader::U16(), profinet::VLAN_ETHERTYPE, and profinet::PNDCPHeader::xId.
Referenced by profinet::device::ProfinetDevice::Discover(), profinet::device::ProfinetDevice::FromIp(), GetParam(), profinet::rpc::GetStationInfo(), ReadResponse(), profinet::device::DcpScanner::Scan(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< DCPDeviceDescription > profinet::dcp::ReceiveHello | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | myMac, | ||
| double | timeoutSec = DEFAULT_HELLO_TIMEOUT, |
||
| const std::function< void(const DCPDeviceDescription &)> & | callback = nullptr |
||
| ) |
Listen for DCP Hello announcements from other devices.
| sock | Bound Ethernet socket to receive on. |
| myMac | This host's MAC address (currently unused for filtering; Hello is multicast). |
| timeoutSec | How long to keep listening. |
| callback | Optional callback invoked for each device as it's discovered. |
Definition at line 1424 of file dcp.cpp.
References option, profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, payload, profinet::PROFINET_ETHERTYPE, ReceiveHello(), profinet::IRawEthernetSocket::Recv(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::IRawEthernetSocket::SetTimeout(), profinet::wire::Reader::Skip(), profinet::EthernetHeader::src, suboption, timer, profinet::EthernetHeader::type, profinet::wire::Reader::U16(), and profinet::VLAN_ETHERTYPE.
Referenced by ReceiveHello(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| DcpBlockError profinet::dcp::RecvSetResponse | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | srcMac, | ||
| int | timeoutSec | ||
| ) |
Receive and parse a DCP SET response, filtering out unrelated frames.
| sock | Raw Ethernet socket used to receive frames. |
| srcMac | Destination MAC address expected in the received response. |
| timeoutSec | Maximum time in seconds to wait for a valid response. |
| DCPTimeoutError | If no valid DCP SET response is received before the timeout. |
| DCPError | If a matching frame contains an invalid DCP SET response. |
Definition at line 253 of file dcp.cpp.
References profinet::EthernetHeader::dst, profinet::EthernetHeader::Parse(), ParseSetResponse(), profinet::EthernetHeader::payload, payload, profinet::PROFINET_ETHERTYPE, profinet::IRawEthernetSocket::Recv(), profinet::IRawEthernetSocket::SetTimeout(), profinet::wire::Reader::Skip(), timer, profinet::EthernetHeader::type, profinet::wire::Reader::U16(), and profinet::VLAN_ETHERTYPE.
Referenced by ResetToFactory(), SetIp(), SetParam(), SignalDevice(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::ResetToFactory | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | target, | ||
| DcpResetMode | mode = DcpResetMode::Communication, |
||
| double | timeoutSec = DEFAULT_TIMEOUT |
||
| ) |
Reset a device to factory defaults.
| sock | Bound Ethernet socket to send/receive on. |
| src | Source MAC address to send from. |
| target | Destination device's MAC address, as a string. |
| mode | Reset mode bitmask (see RESET_MODE_* constants). |
| timeoutSec | How long to wait for a response. |
WARNING: destructive. This erases device configuration.
Definition at line 1541 of file dcp.cpp.
References profinet::PNDCPHeader::frameId, GetDcpBlockErrorDescription(), profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, RecvSetResponse(), ResetToFactory(), profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by ResetToFactory().
Here is the call graph for this function:
Here is the caller graph for this function:| void profinet::dcp::SendDiscover | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| std::uint16_t | responseDelay = DEFAULT_RESPONSE_DELAY_FACTOR |
||
| ) |
Send a DCP Identify multicast request to discover all devices on the segment.
| sock | Bound Ethernet socket to send on. |
| src | Source MAC address to send from. |
| responseDelay | Response delay factor controlling how devices stagger their replies. |
Definition at line 1173 of file dcp.cpp.
References DCP_MULTICAST_MAC, profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), SendDiscover(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by profinet::device::ProfinetDevice::Discover(), profinet::device::ProfinetDevice::FromIp(), profinet::rpc::GetStationInfo(), profinet::device::DcpScanner::Scan(), SendDiscover(), and TEST_F().
Here is the call graph for this function:
Here is the caller graph for this function:| void profinet::dcp::SendHello | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | stationName, | ||
| const std::string & | ip = "0.0.0.0", |
||
| const std::string & | netmask = "0.0.0.0", |
||
| const std::string & | gateway = "0.0.0.0", |
||
| std::pair< std::uint16_t, std::uint16_t > | deviceId = {0, 0}, |
||
| DcpDeviceRole | deviceRole = DcpDeviceRole::IoDevice |
||
| ) |
Send a DCP Hello multicast announcement (device self-announce after power-on).
| sock | Bound Ethernet socket to send on. |
| src | Source MAC address to send from. |
| stationName | Station name to announce. |
| ip | IPv4 address to announce. |
| netmask | IPv4 subnet mask to announce. |
| gateway | IPv4 default gateway to announce. |
| deviceId | (vendor_id, device_id) pair to announce. |
| deviceRole | Device role bitmask to announce. |
Definition at line 1342 of file dcp.cpp.
References DCP_HELLO_MULTICAST_MAC, profinet::PNDCPHeader::frameId, profinet::Ip2String(), profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), SendHello(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), profinet::ToVec(), and profinet::PNDCPHeader::xId.
Referenced by SendHello(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| void profinet::dcp::SendRequest | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| BlockKey | blockType, | ||
| const std::vector< std::uint8_t > & | value | ||
| ) |
Send a DCP Identify request filtered to a specific (option, suboption).
| sock | Bound Ethernet socket to send on. |
| src | Source MAC address to send from. |
| blockType | (option, suboption) pair to filter by. |
| value | Filter value to match. |
Definition at line 1195 of file dcp.cpp.
References DCP_MULTICAST_MAC, profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::DcpBlockKey::option, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), SendRequest(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::DcpBlockKey::suboption, profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by profinet::rpc::GetStationInfo(), SendRequest(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| void profinet::dcp::SendRequest | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| BlockKey | blockType, | ||
| const std::vector< std::uint8_t > & | value | ||
| ) |
Send a DCP Identify request filtered to a specific (option, suboption).
| sock | Bound Ethernet socket to send on. |
| src | Source MAC address to send from. |
| blockType | (option, suboption) pair to filter by. |
| value | Filter value to match. |
Definition at line 1195 of file dcp.cpp.
References DCP_MULTICAST_MAC, profinet::PNDCPHeader::frameId, profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::DcpBlockKey::option, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), SendRequest(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::String2Mac(), profinet::DcpBlockKey::suboption, profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by profinet::rpc::GetStationInfo(), SendRequest(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::SetIp | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | target, | ||
| const std::string & | ip, | ||
| const std::string & | netmask, | ||
| const std::string & | gateway, | ||
| bool | permanent = false, |
||
| int | timeoutSec = DEFAULT_TIMEOUT, |
||
| int | threadSleepMs = DEFAULT_THREAD_SLEEP_MS |
||
| ) |
Set a device's IP configuration via DCP.
| sock | Bound Ethernet socket to send/receive on. |
| src | Source MAC address to send from. |
| target | Destination device's MAC address, as a string. |
| ip | New IPv4 address. |
| netmask | New IPv4 subnet mask. |
| gateway | New IPv4 default gateway. |
| permanent | Whether the change should persist across power cycles. |
| timeoutSec | How long to wait for a response. |
| threadSleepMs | The time the thread should sleep atleast. |
Definition at line 1120 of file dcp.cpp.
References profinet::PNDCPHeader::frameId, GetDcpBlockErrorDescription(), profinet::Ip2String(), profinet::PNDCPHeader::length, profinet::PNDCPBlockRequest::length, profinet::macAddressLength, profinet::PNDCPBlockRequest::option, profinet::PNDCPHeader::payload, profinet::PNDCPBlockRequest::payload, RecvSetResponse(), profinet::PNDCPHeader::respDelay, profinet::IRawEthernetSocket::Send(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, SetIp(), profinet::String2Mac(), profinet::PNDCPBlockRequest::suboption, profinet::PNDCPBlockRequest::ToBytes(), and profinet::PNDCPHeader::xId.
Referenced by SetIp(), TEST(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::SetParam | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | target, | ||
| const std::string & | param, | ||
| const std::string & | value, | ||
| int | timeoutSec = DEFAULT_TIMEOUT, |
||
| bool | permanent = false, |
||
| int | threadSleepMs = DEFAULT_THREAD_SLEEP_MS |
||
| ) |
Write a named parameter to a device.
| sock | Bound Ethernet socket to send/receive on. |
| src | Source MAC address to send from. |
| target | Destination device's MAC address, as a string. |
| param | Parameter name ("name" or "ip"); see Params(). |
| value | New value to write. |
| timeoutSec | How long to wait for a response. |
| permanent | If true, request permanent storage (survives power cycle); default writes a temporary value |
| threadSleepMs | The time the thread should sleep atleast. |
Throws DCPError on an unknown parameter, or if the device rejects the value; throws ValidationError if a station name exceeds DCP_MAX_NAME_LENGTH.
Definition at line 1096 of file dcp.cpp.
References BuildSetParamRequest(), frame, GetDcpBlockErrorDescription(), RecvSetResponse(), profinet::IRawEthernetSocket::Send(), SetParam(), and profinet::String2Mac().
Referenced by SetParam(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| bool profinet::dcp::SignalDevice | ( | IRawEthernetSocket & | sock, |
| const MacAddress & | src, | ||
| const std::string & | target, | ||
| int | durationMs = FLASH_DURATION_MS, |
||
| double | timeoutSec = DEFAULT_TIMEOUT |
||
| ) |
Flash a device's identification LEDs.
| sock | Bound Ethernet socket to send/receive on. |
| src | Source MAC address to send from. |
| target | Destination device's MAC address, as a string. |
| durationMs | How long the device should flash its LEDs, in milliseconds. |
| timeoutSec | How long to wait for a response. – Ignored; the spec defines only "flash once" and the device controls the blink pattern. Kept for API compatibility |
Definition at line 1519 of file dcp.cpp.
References BuildDcpSignalRequest(), frame, GetDcpBlockErrorDescription(), RecvSetResponse(), profinet::IRawEthernetSocket::Send(), SignalDevice(), and profinet::String2Mac().
Referenced by SignalDevice(), TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ConstructorDecodesAllSupportedBlocks | |||
| ) |
Definition at line 1623 of file test_dcp.cpp.
References profinet::Alias, profinet::dcp::DCPDeviceDescription::aliasName, profinet::Device, profinet::dcp::DCPDeviceDescription::DeviceId(), profinet::DeviceId, profinet::dcp::DCPDeviceDescription::deviceInitiative, profinet::DeviceInitiative, profinet::dcp::DCPDeviceDescription::deviceInstance, profinet::dcp::DCPDeviceDescription::deviceRole, profinet::dcp::DCPDeviceDescription::deviceRoles, profinet::dcp::DCPDeviceDescription::deviceType, profinet::Dhcp, profinet::dcp::DCPDeviceDescription::dhcpBlocks, profinet::dcp::DCPDeviceDescription::gateway, profinet::Hostname, profinet::Initiative, profinet::Instance, profinet::IoController, profinet::IoDevice, profinet::dcp::DCPDeviceDescription::ip, profinet::Ip, profinet::dcp::DCPDeviceDescription::ipBlockInfo, profinet::dcp::DCPDeviceDescription::ipConflict, profinet::IpParameter, profinet::dcp::DCPDeviceDescription::ipSetByDhcp, profinet::IssueHello, profinet::dcp::DCPDeviceDescription::issuesHello, profinet::dcp::DCPDeviceDescription::mac, MakeBlockKey(), profinet::dcp::DCPDeviceDescription::name, profinet::Name, profinet::dcp::DCPDeviceDescription::netmask, profinet::Options, profinet::dcp::DCPDeviceDescription::rawBlocks, profinet::Role, profinet::SetByDhcpConflict, profinet::dcp::DCPDeviceDescription::supportedOptions, profinet::Type, and profinet::dcp::DCPDeviceDescription::VendorId().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ConstructorHandlesLegacyTwelveByteIpBlock | |||
| ) |
Definition at line 1770 of file test_dcp.cpp.
References profinet::dcp::DCPDeviceDescription::gateway, profinet::dcp::DCPDeviceDescription::ip, profinet::Ip, profinet::dcp::DCPDeviceDescription::ipBlockInfo, profinet::dcp::DCPDeviceDescription::ipConflict, profinet::IpParameter, profinet::dcp::DCPDeviceDescription::ipSetByDhcp, MakeBlockKey(), profinet::dcp::DCPDeviceDescription::netmask, profinet::NotSet, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ConstructorIgnoresIncompleteOptionalBlocks | |||
| ) |
Definition at line 1720 of file test_dcp.cpp.
References profinet::Device, profinet::dcp::DCPDeviceDescription::DeviceId(), profinet::DeviceId, profinet::dcp::DCPDeviceDescription::deviceInitiative, profinet::DeviceInitiative, profinet::dcp::DCPDeviceDescription::deviceInstance, profinet::dcp::DCPDeviceDescription::deviceRoles, profinet::dcp::DCPDeviceDescription::deviceType, profinet::dcp::DCPDeviceDescription::gateway, profinet::Initiative, profinet::Instance, profinet::dcp::DCPDeviceDescription::ip, profinet::Ip, profinet::IpParameter, profinet::dcp::DCPDeviceDescription::issuesHello, MakeBlockKey(), profinet::dcp::DCPDeviceDescription::name, profinet::Name, profinet::dcp::DCPDeviceDescription::netmask, profinet::NoHello, profinet::Options, profinet::Role, profinet::String2Mac(), profinet::dcp::DCPDeviceDescription::supportedOptions, profinet::Type, and profinet::dcp::DCPDeviceDescription::VendorId().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ConstructorUsesLegacyIpLayoutForThirteenByteBlock | |||
| ) |
Definition at line 1791 of file test_dcp.cpp.
References profinet::dcp::DCPDeviceDescription::gateway, profinet::dcp::DCPDeviceDescription::ip, profinet::Ip, profinet::dcp::DCPDeviceDescription::ipBlockInfo, profinet::IpParameter, MakeBlockKey(), profinet::dcp::DCPDeviceDescription::netmask, profinet::NotSet, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ToStringFormatsDhcpBlockVariants | |||
| ) |
Definition at line 1597 of file test_dcp.cpp.
References profinet::Fqdn, profinet::Hostname, profinet::dcp::DCPDeviceDescription::name, profinet::dcp::DCPDHCPBlock::Parse(), profinet::String2Mac(), profinet::Uuid, and profinet::VendorSpec.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ToStringIncludesAllPopulatedFields | |||
| ) |
Definition at line 1527 of file test_dcp.cpp.
References profinet::ClientId, profinet::Dhcp, profinet::Fqdn, profinet::Hostname, profinet::Ip, profinet::IssueHello, profinet::Mac, MakeBlockKey(), profinet::dcp::DCPDeviceDescription::name, profinet::dcp::DCPDHCPBlock::Parse(), profinet::SetByDhcp, profinet::String2Mac(), and profinet::Uuid.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DCPDeviceDescriptionTest | , |
| ToStringOmitsUnsetOptionalFields | |||
| ) |
Definition at line 1577 of file test_dcp.cpp.
References profinet::dcp::DCPDeviceDescription::name, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BlockQualifierGetNamePermanent | |||
| ) |
Definition at line 670 of file test_dcp.cpp.
References GetDcpBlockQualifierDescription(), and profinet::Permanent.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BlockQualifierGetNameTemporary | |||
| ) |
Definition at line 664 of file test_dcp.cpp.
References GetDcpBlockQualifierDescription(), and profinet::Temporary.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BlockQualifierGetNameUnknown | |||
| ) |
Definition at line 676 of file test_dcp.cpp.
References GetDcpBlockQualifierDescription().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildDcpSignalRequestBuildsCorrectWireFormat | |||
| ) |
Definition at line 1920 of file test_dcp.cpp.
References BuildDcpSignalRequest(), profinet::Control, frame, profinet::GetSet, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::Set, profinet::Signal, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestAcceptsMaximumStationName | |||
| ) |
Definition at line 1908 of file test_dcp.cpp.
References BuildSetParamRequest(), DCP_MAX_NAME_LENGTH, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestBuildsPermanentEvenLengthName | |||
| ) |
Definition at line 1850 of file test_dcp.cpp.
References BuildSetParamRequest(), frame, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestBuildsTemporaryOddLengthName | |||
| ) |
Definition at line 1811 of file test_dcp.cpp.
References BuildSetParamRequest(), profinet::Device, frame, profinet::GetSet, profinet::Name, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::Set, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestRejectsIpParameter | |||
| ) |
Definition at line 1873 of file test_dcp.cpp.
References BuildSetParamRequest(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestRejectsOverlongStationName | |||
| ) |
Definition at line 1895 of file test_dcp.cpp.
References BuildSetParamRequest(), DCP_MAX_NAME_LENGTH, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| BuildSetParamRequestRejectsUnknownParameter | |||
| ) |
Definition at line 1884 of file test_dcp.cpp.
References BuildSetParamRequest(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockKnownSuboptionNames | |||
| ) |
Definition at line 911 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseClientId | |||
| ) |
Definition at line 807 of file test_dcp.cpp.
References profinet::ClientId, and profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseEmptyFqdn | |||
| ) |
Definition at line 1516 of file test_dcp.cpp.
References profinet::Fqdn, and profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseEmptyHostname | |||
| ) |
Definition at line 1505 of file test_dcp.cpp.
References profinet::Hostname, and profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseFqdn | |||
| ) |
Definition at line 837 of file test_dcp.cpp.
References profinet::Fqdn, and profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseHostname | |||
| ) |
Definition at line 791 of file test_dcp.cpp.
References profinet::Hostname, and profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUnknownEnumValue | |||
| ) |
Definition at line 1494 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse(), and profinet::Unknown.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUnknownSuboption | |||
| ) |
Definition at line 882 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUnknownSuboptionEmptyPayload | |||
| ) |
Definition at line 897 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUuid | |||
| ) |
Definition at line 852 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse(), and profinet::Uuid.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUuidMinimumLength | |||
| ) |
Definition at line 873 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse(), and profinet::Uuid.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseUuidTooShort | |||
| ) |
Definition at line 863 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse(), and profinet::Uuid.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpDhcpBlockParseVendorSpecific | |||
| ) |
Definition at line 822 of file test_dcp.cpp.
References profinet::dcp::DCPDHCPBlock::Parse(), and profinet::VendorSpec.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpResponseCodeGetNameDefinedValues | |||
| ) |
Definition at line 755 of file test_dcp.cpp.
References GetDcpResponseCodeName(), profinet::InOperationSetNotPossible, profinet::NoError, profinet::OptionNotSupported, profinet::ResourceError, profinet::SetNotPossible, profinet::SuboptionNotSet, and profinet::SuboptionNotSupported.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DcpResponseCodeGetNameUnknown | |||
| ) |
Definition at line 767 of file test_dcp.cpp.
References GetDcpResponseCodeName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRoleAllRoles | |||
| ) |
Definition at line 569 of file test_dcp.cpp.
References DecodeDeviceRole(), profinet::IoController, profinet::IoDevice, profinet::IoMultidevice, and profinet::PnSupervisor.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRoleIoController | |||
| ) |
Definition at line 545 of file test_dcp.cpp.
References DecodeDeviceRole(), and profinet::IoController.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRoleIoDevice | |||
| ) |
Definition at line 537 of file test_dcp.cpp.
References DecodeDeviceRole(), and profinet::IoDevice.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRoleIoMultidevice | |||
| ) |
Definition at line 553 of file test_dcp.cpp.
References DecodeDeviceRole(), and profinet::IoMultidevice.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRolePnSupervisor | |||
| ) |
Definition at line 561 of file test_dcp.cpp.
References DecodeDeviceRole(), and profinet::PnSupervisor.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DecodeDeviceRoleUnknown | |||
| ) |
Definition at line 529 of file test_dcp.cpp.
References DecodeDeviceRole().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceInitiativeIssueHello | |||
| ) |
Definition at line 743 of file test_dcp.cpp.
References GetDeviceInitiativeName(), and profinet::IssueHello.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceInitiativeNoHello | |||
| ) |
Definition at line 737 of file test_dcp.cpp.
References GetDeviceInitiativeName(), and profinet::NoHello.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceInitiativeUnknown | |||
| ) |
Definition at line 749 of file test_dcp.cpp.
References GetDeviceInitiativeName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceRoleBitwiseAndAbsent | |||
| ) |
Definition at line 1429 of file test_dcp.cpp.
References profinet::IoController, profinet::IoDevice, and profinet::PnSupervisor.
| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceRoleBitwiseAndPresent | |||
| ) |
Definition at line 1420 of file test_dcp.cpp.
References profinet::IoController, and profinet::IoDevice.
| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceRoleBitwiseOr | |||
| ) |
Definition at line 1411 of file test_dcp.cpp.
References profinet::IoController, and profinet::IoDevice.
| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceRoleNameDefinedValues | |||
| ) |
Definition at line 1302 of file test_dcp.cpp.
References DeviceRoleName(), profinet::IoController, profinet::IoDevice, profinet::IoMultidevice, and profinet::PnSupervisor.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| DeviceRoleNameUnknown | |||
| ) |
Definition at line 1311 of file test_dcp.cpp.
References DeviceRoleName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameDeviceInitiativeSuboption | |||
| ) |
Definition at line 1342 of file test_dcp.cpp.
References profinet::DeviceInitiative, GetBlockName(), and profinet::Initiative.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameKnownControlAndDeviceInitiativeSuboptions | |||
| ) |
Definition at line 593 of file test_dcp.cpp.
References profinet::Control, profinet::DeviceInitiative, GetBlockName(), profinet::Initiative, and profinet::Signal.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameKnownDeviceAndDhcpSuboptions | |||
| ) |
Definition at line 586 of file test_dcp.cpp.
References profinet::Device, profinet::Dhcp, GetBlockName(), profinet::Hostname, and profinet::Name.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameKnownOptionAndSuboption | |||
| ) |
Definition at line 580 of file test_dcp.cpp.
References GetBlockName(), profinet::Ip, and profinet::Mac.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameKnownOptionUnknownSuboption | |||
| ) |
Definition at line 600 of file test_dcp.cpp.
References GetBlockName(), and profinet::Ip.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameKnownOptionWithoutSuboptionTable | |||
| ) |
Definition at line 606 of file test_dcp.cpp.
References GetBlockName(), and profinet::Reserved.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameOptionsWithoutSuboptions | |||
| ) |
Definition at line 1327 of file test_dcp.cpp.
References profinet::All, GetBlockName(), profinet::Nme, profinet::Reserved, and profinet::Unknown.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameUint16OptionOverload | |||
| ) |
Definition at line 1336 of file test_dcp.cpp.
References GetBlockName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameUnknownOption | |||
| ) |
Definition at line 619 of file test_dcp.cpp.
References GetBlockName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameUnknownSuboptionForAllTypedOptionGroups | |||
| ) |
Definition at line 1317 of file test_dcp.cpp.
References profinet::Control, profinet::Device, profinet::DeviceInitiative, profinet::Dhcp, GetBlockName(), and profinet::Ip.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetBlockNameVendorOption | |||
| ) |
Definition at line 612 of file test_dcp.cpp.
References GetBlockName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetDcpBlockErrorNameDefinedValues | |||
| ) |
Definition at line 773 of file test_dcp.cpp.
References GetDcpBlockErrorDescription(), profinet::InOperation, profinet::Ok, profinet::OptionUnsupported, profinet::Resource, profinet::SetNotPossible, profinet::SuboptionNotSet, and profinet::SuboptionUnsupported.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetDcpBlockErrorNameUnknown | |||
| ) |
Definition at line 785 of file test_dcp.cpp.
References GetDcpBlockErrorDescription().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetParamReturnsMatchingParameter | |||
| ) |
Definition at line 1982 of file test_dcp.cpp.
References GetParam(), profinet::Mac2String(), profinet::DcpBlockKey::option, Params(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::String2Mac(), profinet::DcpBlockKey::suboption, and profinet::PNDCPHeader::xId.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetParamReturnsNulloptOnTimeout | |||
| ) |
Definition at line 2071 of file test_dcp.cpp.
References GetParam(), profinet::Mac2String(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetParamReturnsNulloptWhenParameterIsMissing | |||
| ) |
Definition at line 2028 of file test_dcp.cpp.
References profinet::Device, GetParam(), profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::String2Mac(), profinet::Type, and profinet::PNDCPHeader::xId.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetParamSendsCorrectGetRequest | |||
| ) |
Definition at line 4127 of file test_dcp.cpp.
References profinet::Device, profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::Get, GetParam(), profinet::GetSet, profinet::Mac2String(), profinet::Name, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::type, and profinet::PNDCPHeader::xId.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| GetParamThrowsForUnknownParameter | |||
| ) |
Definition at line 1971 of file test_dcp.cpp.
References GetParam(), profinet::Mac2String(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| IpBlockInfoBitHelpersHandleUnknownCombinations | |||
| ) |
Definition at line 1463 of file test_dcp.cpp.
References HasConflict(), and IsDhcp().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| IpBlockInfoGetNameDefinedValues | |||
| ) |
Definition at line 626 of file test_dcp.cpp.
References GetIPBlockInfoName(), profinet::NotSet, profinet::NotSetConflict, profinet::Set, profinet::SetByDhcp, profinet::SetByDhcpConflict, and profinet::SetConflict.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| IpBlockInfoGetNameUnknown | |||
| ) |
Definition at line 637 of file test_dcp.cpp.
References GetIPBlockInfoName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| IpBlockInfoHasConflict | |||
| ) |
Definition at line 643 of file test_dcp.cpp.
References HasConflict(), profinet::NotSet, profinet::NotSetConflict, profinet::Set, profinet::SetByDhcpConflict, and profinet::SetConflict.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| IpBlockInfoIsDhcp | |||
| ) |
Definition at line 653 of file test_dcp.cpp.
References IsDhcp(), profinet::NotSet, profinet::NotSetConflict, profinet::Set, profinet::SetByDhcp, profinet::SetByDhcpConflict, and profinet::SetConflict.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyControlSuboption | |||
| ) |
Definition at line 1384 of file test_dcp.cpp.
References profinet::Control, MakeBlockKey(), and profinet::Signal.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyDeviceInitiativeSuboption | |||
| ) |
Definition at line 1402 of file test_dcp.cpp.
References profinet::DeviceInitiative, profinet::Initiative, and MakeBlockKey().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyDeviceSuboption | |||
| ) |
Definition at line 1375 of file test_dcp.cpp.
References profinet::Device, MakeBlockKey(), and profinet::Role.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyDhcpSuboption | |||
| ) |
Definition at line 1393 of file test_dcp.cpp.
References profinet::Dhcp, profinet::Hostname, and MakeBlockKey().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyGenericSuboption | |||
| ) |
Definition at line 1357 of file test_dcp.cpp.
References profinet::Device, MakeBlockKey(), and profinet::Name.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyIpSuboption | |||
| ) |
Definition at line 1366 of file test_dcp.cpp.
References profinet::Ip, profinet::Mac, and MakeBlockKey().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| MakeBlockKeyRawOption | |||
| ) |
Definition at line 1348 of file test_dcp.cpp.
References profinet::Device, MakeBlockKey(), and profinet::Name.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParamsContainsSupportedParameters | |||
| ) |
Definition at line 1956 of file test_dcp.cpp.
References profinet::Device, profinet::Ip, profinet::IpParameter, profinet::Name, and Params().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseAcceptsVlanFrame | |||
| ) |
Definition at line 943 of file test_dcp.cpp.
References profinet::Ok, ParseSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseEmptyResponseBlockReturnsSuccess | |||
| ) |
Definition at line 1035 of file test_dcp.cpp.
References profinet::Control, profinet::Ok, ParseSetResponse(), profinet::Response, and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseExtractsShortBlockError | |||
| ) |
Definition at line 1021 of file test_dcp.cpp.
References profinet::Control, ParseSetResponse(), profinet::Response, profinet::ResponseSuccess, and profinet::SetNotPossible.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseExtractsThreeByteBlockError | |||
| ) |
Definition at line 1005 of file test_dcp.cpp.
References profinet::Control, ParseSetResponse(), profinet::Resource, profinet::Response, and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsMalformedDcpHeader | |||
| ) |
Definition at line 973 of file test_dcp.cpp.
References ParseSetResponse(), profinet::PROFINET_ETHERTYPE, and profinet::wire::PutBigEndian().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsMalformedEthernetHeader | |||
| ) |
Definition at line 925 of file test_dcp.cpp.
References ParseSetResponse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsShortVlanFrame | |||
| ) |
Definition at line 932 of file test_dcp.cpp.
References ParseSetResponse(), profinet::wire::PutBigEndian(), and profinet::VLAN_ETHERTYPE.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsTooShortFrame | |||
| ) |
Definition at line 919 of file test_dcp.cpp.
References ParseSetResponse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsUnexpectedEtherType | |||
| ) |
Definition at line 963 of file test_dcp.cpp.
References ParseSetResponse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsUnexpectedService | |||
| ) |
Definition at line 991 of file test_dcp.cpp.
References ParseSetResponse(), and payload.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsUnexpectedVlanInnerEtherType | |||
| ) |
Definition at line 949 of file test_dcp.cpp.
References ParseSetResponse(), profinet::wire::PutBigEndian(), and profinet::VLAN_ETHERTYPE.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseRejectsUnsupportedService | |||
| ) |
Definition at line 984 of file test_dcp.cpp.
References ParseSetResponse(), payload, and profinet::ResponseUnsupported.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseSkipsNonResponseBlocks | |||
| ) |
Definition at line 1044 of file test_dcp.cpp.
References profinet::Control, profinet::Device, profinet::InOperation, profinet::Name, ParseSetResponse(), profinet::Response, and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseUsesFirstResponseBlock | |||
| ) |
Definition at line 1068 of file test_dcp.cpp.
References profinet::Control, profinet::Ok, ParseSetResponse(), profinet::Resource, profinet::Response, and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ParseSetResponseWithoutResponseBlockReturnsSuccess | |||
| ) |
Definition at line 998 of file test_dcp.cpp.
References profinet::Ok, ParseSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseAcceptsAnyXidWhenExpectedXidIsNotSpecified | |||
| ) |
Definition at line 2465 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseContinuesAfterIgnoredFrames | |||
| ) |
Definition at line 2952 of file test_dcp.cpp.
References profinet::Device, profinet::Get, profinet::GetSet, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::Request, profinet::ResponseSuccess, profinet::ResponseUnsupported, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresEmptyData | |||
| ) |
Definition at line 2532 of file test_dcp.cpp.
References ReadResponse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresMalformedDcpHeader | |||
| ) |
Definition at line 2693 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, ReadResponse(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresMalformedEthernetFrame | |||
| ) |
Definition at line 2567 of file test_dcp.cpp.
References ReadResponse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresShortEthernetFrame | |||
| ) |
Definition at line 2549 of file test_dcp.cpp.
References ReadResponse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresShortVlanPayload | |||
| ) |
Definition at line 2612 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, ReadResponse(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), profinet::EthernetHeader::type, and profinet::VLAN_ETHERTYPE.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresUnexpectedXid | |||
| ) |
Definition at line 2499 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresUnsuccessfulServiceType | |||
| ) |
Definition at line 2720 of file test_dcp.cpp.
References frame, ReadResponse(), profinet::ResponseUnsupported, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresWrongDestination | |||
| ) |
Definition at line 2585 of file test_dcp.cpp.
References frame, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresWrongEtherType | |||
| ) |
Definition at line 2666 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, ReadResponse(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseIgnoresWrongVlanInnerEtherType | |||
| ) |
Definition at line 2639 of file test_dcp.cpp.
References frame, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseLimitsBlockRegionToDcpLength | |||
| ) |
Definition at line 2820 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, payload, ReadResponse(), profinet::ResponseSuccess, profinet::String2Mac(), and profinet::Type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseParsesValidVlanResponse | |||
| ) |
Definition at line 2746 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseProcessesMultipleResponsesWhenOnceIsFalse | |||
| ) |
Definition at line 2870 of file test_dcp.cpp.
References profinet::Device, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseReturnsEmptyMapOnTimeout | |||
| ) |
Definition at line 3018 of file test_dcp.cpp.
References ReadResponse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseReturnsValidResponse | |||
| ) |
Definition at line 2422 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseSetsExpectedSocketTimeout | |||
| ) |
Definition at line 2409 of file test_dcp.cpp.
References ReadResponse(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseStopsAfterFirstValidResponseWhenOnceIsTrue | |||
| ) |
Definition at line 2918 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReadResponseUsesEmptyBlockRegionForShortDcpLength | |||
| ) |
Definition at line 2781 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Name, profinet::DcpBlockKey::option, ReadResponse(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloContinuesAfterIgnoredFrame | |||
| ) |
Definition at line 3772 of file test_dcp.cpp.
References profinet::Device, profinet::Get, profinet::Hello, profinet::Name, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloDoesNotInvokeEmptyCallback | |||
| ) |
Definition at line 3466 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Hello, profinet::Name, payload, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresEmptyData | |||
| ) |
Definition at line 3526 of file test_dcp.cpp.
References ReceiveHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresMalformedDcpHeader | |||
| ) |
Definition at line 3687 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, ReceiveHello(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresMalformedEthernetFrame | |||
| ) |
Definition at line 3562 of file test_dcp.cpp.
References ReceiveHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresNonHelloServiceId | |||
| ) |
Definition at line 3714 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Get, profinet::Name, payload, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresNonRequestServiceType | |||
| ) |
Definition at line 3743 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Hello, profinet::Name, payload, ReceiveHello(), profinet::ResponseSuccess, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresShortEthernetFrame | |||
| ) |
Definition at line 3544 of file test_dcp.cpp.
References ReceiveHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresShortPnioPayload | |||
| ) |
Definition at line 3660 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, ReceiveHello(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresShortVlanPayload | |||
| ) |
Definition at line 3580 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, ReceiveHello(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), profinet::EthernetHeader::type, and profinet::VLAN_ETHERTYPE.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresWrongEtherType | |||
| ) |
Definition at line 3633 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, frame, profinet::EthernetHeader::payload, ReceiveHello(), profinet::EthernetHeader::src, profinet::String2Mac(), profinet::EthernetHeader::ToBytes(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloIgnoresWrongVlanInnerEtherType | |||
| ) |
Definition at line 3607 of file test_dcp.cpp.
References frame, profinet::Hello, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloInvokesCallbackForValidDevice | |||
| ) |
Definition at line 3425 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Hello, profinet::dcp::DCPDeviceDescription::mac, profinet::Mac2String(), profinet::dcp::DCPDeviceDescription::name, profinet::Name, payload, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloParsesValidVlanHello | |||
| ) |
Definition at line 3495 of file test_dcp.cpp.
References profinet::Device, frame, profinet::Hello, profinet::Mac2String(), profinet::Name, payload, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloReturnsEmptyOnTimeout | |||
| ) |
Definition at line 3856 of file test_dcp.cpp.
References ReceiveHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloReturnsMultipleDevices | |||
| ) |
Definition at line 3809 of file test_dcp.cpp.
References profinet::Device, profinet::Hello, profinet::Mac2String(), profinet::Name, ReceiveHello(), profinet::Request, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloReturnsValidDevice | |||
| ) |
Definition at line 3361 of file test_dcp.cpp.
References profinet::Device, profinet::DeviceId, frame, profinet::Hello, profinet::IoDevice, profinet::Ip, profinet::IpParameter, profinet::Mac2String(), profinet::Name, payload, ReceiveHello(), profinet::Request, profinet::Role, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ReceiveHelloSetsExpectedSocketTimeout | |||
| ) |
Definition at line 3347 of file test_dcp.cpp.
References ReceiveHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseAcceptsVlanResponse | |||
| ) |
Definition at line 1224 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresEmptyFrame | |||
| ) |
Definition at line 1104 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresMalformedEthernetFrame | |||
| ) |
Definition at line 1134 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresShortFrame | |||
| ) |
Definition at line 1119 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresShortVlanPayload | |||
| ) |
Definition at line 1167 of file test_dcp.cpp.
References profinet::Ok, profinet::wire::PutBigEndian(), profinet::wire::PutFixed(), RecvSetResponse(), profinet::ResponseSuccess, and profinet::VLAN_ETHERTYPE.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresUnexpectedServiceType | |||
| ) |
Definition at line 1239 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresWrongDestinationMac | |||
| ) |
Definition at line 1150 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresWrongEtherType | |||
| ) |
Definition at line 1206 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseIgnoresWrongVlanInnerEtherType | |||
| ) |
Definition at line 1188 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponsePropagatesDcpError | |||
| ) |
Definition at line 1255 of file test_dcp.cpp.
References RecvSetResponse(), and profinet::ResponseUnsupported.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseReturnsBlockError | |||
| ) |
Definition at line 1268 of file test_dcp.cpp.
References profinet::Control, profinet::InOperation, RecvSetResponse(), profinet::Response, and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseReturnsSuccessfulResponse | |||
| ) |
Definition at line 1091 of file test_dcp.cpp.
References profinet::Ok, RecvSetResponse(), and profinet::ResponseSuccess.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| RecvSetResponseTimesOut | |||
| ) |
Definition at line 1290 of file test_dcp.cpp.
References RecvSetResponse().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetModeBitwiseAndAbsent | |||
| ) |
Definition at line 1455 of file test_dcp.cpp.
References profinet::Application, profinet::Communication, and profinet::Factory.
| profinet::dcp::TEST | ( | DcpTest | , |
| ResetModeBitwiseAndPresent | |||
| ) |
Definition at line 1447 of file test_dcp.cpp.
References profinet::Application, and profinet::Communication.
| profinet::dcp::TEST | ( | DcpTest | , |
| ResetModeBitwiseOr | |||
| ) |
Definition at line 1438 of file test_dcp.cpp.
References profinet::Application, and profinet::Communication.
| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierAllStoredData | |||
| ) |
Definition at line 703 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierApplicationData | |||
| ) |
Definition at line 682 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierCommunicationParameter | |||
| ) |
Definition at line 689 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierEngineeringParameter | |||
| ) |
Definition at line 696 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierEngineeringParameterSecondRange | |||
| ) |
Definition at line 710 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierFactory | |||
| ) |
Definition at line 717 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierRestoreData | |||
| ) |
Definition at line 724 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierUnknown | |||
| ) |
Definition at line 731 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierUnknownEnumValue | |||
| ) |
Definition at line 1482 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetQualifierZeroIsUnknown | |||
| ) |
Definition at line 1488 of file test_dcp.cpp.
References GetResetQualifierName().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetToFactoryEncodesCombinedResetMode | |||
| ) |
Definition at line 4027 of file test_dcp.cpp.
References profinet::Application, profinet::Communication, profinet::Engineering, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::ResetToFactory, profinet::wire::Reader::SkipTo(), profinet::String2Mac(), and profinet::wire::Reader::U16().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetToFactoryRejectsInvalidTargetMac | |||
| ) |
Definition at line 4113 of file test_dcp.cpp.
References profinet::Communication, profinet::ResetToFactory, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetToFactoryReturnsFalseOnTimeout | |||
| ) |
Definition at line 4068 of file test_dcp.cpp.
References profinet::Communication, profinet::EthernetHeader::dst, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PROFINET_ETHERTYPE, profinet::ResetToFactory, profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetToFactoryReturnsTrueForSuccessfulResponse | |||
| ) |
Definition at line 3966 of file test_dcp.cpp.
References profinet::Communication, profinet::Control, profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::GetSet, profinet::PNDCPHeader::length, profinet::Mac2String(), profinet::Ok, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::ResetToFactory, profinet::PNDCPHeader::respDelay, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::Set, profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| ResetToFactoryThrowsForBlockError | |||
| ) |
Definition at line 4094 of file test_dcp.cpp.
References profinet::Communication, profinet::Mac2String(), profinet::ResetToFactory, profinet::SetNotPossible, and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloAddsPaddingForOddLengthStationName | |||
| ) |
Definition at line 3146 of file test_dcp.cpp.
References profinet::Device, profinet::IoDevice, profinet::Ip, profinet::Name, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloBuildsCompleteHelloFrame | |||
| ) |
Definition at line 3032 of file test_dcp.cpp.
References DCP_HELLO_MULTICAST_MAC, profinet::Device, profinet::DeviceId, profinet::DeviceInitiative, profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::Hello, profinet::Initiative, profinet::IoDevice, profinet::Ip, profinet::IpParameter, profinet::PNDCPHeader::length, profinet::Name, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::respDelay, profinet::Role, SendHello(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloEncodesCombinedDeviceRole | |||
| ) |
Definition at line 3191 of file test_dcp.cpp.
References profinet::Device, profinet::IoController, profinet::IoDevice, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::Role, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloEncodesDeviceId | |||
| ) |
Definition at line 3238 of file test_dcp.cpp.
References profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PnSupervisor, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloRejectsInvalidGateway | |||
| ) |
Definition at line 3326 of file test_dcp.cpp.
References profinet::IoDevice, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloRejectsInvalidIpAddress | |||
| ) |
Definition at line 3284 of file test_dcp.cpp.
References profinet::IoDevice, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendHelloRejectsInvalidNetmask | |||
| ) |
Definition at line 3305 of file test_dcp.cpp.
References profinet::IoDevice, SendHello(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SendRequestBuildsIdentifyRequest | |||
| ) |
Definition at line 2314 of file test_dcp.cpp.
References DCP_MULTICAST_MAC, profinet::Device, profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::Identify, profinet::IdentifyRequest, profinet::Name, profinet::DcpBlockKey::option, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::respDelay, SendRequest(), profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetIpBuildsPermanentIpBlock | |||
| ) |
Definition at line 2363 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::GetSet, profinet::Ip, profinet::IpParameter, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::Set, SetIp(), profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetIpEncodesPermanentQualifier | |||
| ) |
Definition at line 2209 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::GetSet, profinet::Ip, profinet::IpParameter, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::Set, SetIp(), profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetIpEncodesTemporaryQualifier | |||
| ) |
Definition at line 2279 of file test_dcp.cpp.
References profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PNDCPHeader::payload, SetIp(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetIpRejectsInvalidIpAddress | |||
| ) |
Definition at line 2195 of file test_dcp.cpp.
References profinet::Mac2String(), SetIp(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetIpReturnsFalseOnTimeout | |||
| ) |
Definition at line 2171 of file test_dcp.cpp.
References profinet::Mac2String(), SetIp(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetParamBuildsTemporaryRequest | |||
| ) |
Definition at line 2147 of file test_dcp.cpp.
References profinet::Mac2String(), SetParam(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetParamReturnsFalseOnTimeout | |||
| ) |
Definition at line 2132 of file test_dcp.cpp.
References profinet::Mac2String(), SetParam(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetParamReturnsTrueForSuccessfulResponse | |||
| ) |
Definition at line 2086 of file test_dcp.cpp.
References profinet::Mac2String(), profinet::Ok, SetParam(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SetParamThrowsForDeviceBlockError | |||
| ) |
Definition at line 2113 of file test_dcp.cpp.
References profinet::Mac2String(), profinet::SetNotPossible, SetParam(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SignalDeviceRejectsInvalidTargetMac | |||
| ) |
Definition at line 3952 of file test_dcp.cpp.
References SignalDevice(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SignalDeviceReturnsFalseOnTimeout | |||
| ) |
Definition at line 3926 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, profinet::Mac2String(), profinet::EthernetHeader::Parse(), profinet::PROFINET_ETHERTYPE, SignalDevice(), profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SignalDeviceReturnsTrueForSuccessfulResponse | |||
| ) |
Definition at line 3870 of file test_dcp.cpp.
References profinet::EthernetHeader::dst, profinet::PNDCPHeader::frameId, profinet::GetSet, profinet::Mac2String(), profinet::Ok, profinet::EthernetHeader::Parse(), profinet::PNDCPHeader::Parse(), profinet::EthernetHeader::payload, profinet::PROFINET_ETHERTYPE, profinet::Request, profinet::PNDCPHeader::serviceId, profinet::PNDCPHeader::serviceType, profinet::Set, SignalDevice(), profinet::EthernetHeader::src, profinet::String2Mac(), and profinet::EthernetHeader::type.
Here is the call graph for this function:| profinet::dcp::TEST | ( | DcpTest | , |
| SignalDeviceThrowsForBlockError | |||
| ) |
Definition at line 3907 of file test_dcp.cpp.
References profinet::Mac2String(), profinet::SetNotPossible, SignalDevice(), and profinet::String2Mac().
Here is the call graph for this function:| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| DefaultQualifierIsTemporary | |||
| ) |
Definition at line 206 of file test_dcpWireFormat.cpp.
References frame, payload, and profinet::Temporary.
| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| EvenLengthNameIsNotPadded | |||
| ) |
An even-length station name already produces an aligned DCP block, so no additional padding byte is required.
Definition at line 184 of file test_dcpWireFormat.cpp.
References frame, profinet::PNDCPBlock::NAME_OF_STATION, payload, and profinet::Temporary.
| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| IpParameterMatchingIsCaseInsensitive | |||
| ) |
The legacy string-based IP SET operation must be rejected regardless of the capitalization used for the parameter name.
Definition at line 248 of file test_dcpWireFormat.cpp.
References BuildSetParamRequest().
Here is the call graph for this function:| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| IpSetOperationIsRejected | |||
| ) |
IP configuration requires binary IPv4 address, subnet mask, and gateway values and must therefore be performed through SetIp() rather than the string-valued SetParam() API. The request builder must reject the operation before constructing or transmitting a DCP frame.
Definition at line 233 of file test_dcpWireFormat.cpp.
References BuildSetParamRequest().
Here is the call graph for this function:| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| OddLengthNameIsPaddedAndBlockLengthExcludesPadding | |||
| ) |
The logical DCP block contains a four-byte block header, a two-byte BlockQualifier, and the three-byte station name. Therefore BlockLength is five bytes, while one additional zero padding byte is present on the wire to maintain two-byte alignment.
Definition at line 158 of file test_dcpWireFormat.cpp.
References frame, profinet::PNDCPBlock::NAME_OF_STATION, payload, and profinet::Temporary.
| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| PermanentQualifierIsSerialized | |||
| ) |
Definition at line 216 of file test_dcpWireFormat.cpp.
References frame, payload, and profinet::Permanent.
| profinet::dcp::TEST_F | ( | DcpWireFormatTest | , |
| SignalUsesFlashOnceValue | |||
| ) |
The Control/Signal block contains a zero BlockQualifier followed by the SignalValue 0x0100, which represents the Flash-Once command.
The resulting DCP block is eight bytes:
Definition at line 284 of file test_dcpWireFormat.cpp.
References profinet::Control, frame, payload, and profinet::Signal.
|
inlineconstexpr |
Default flash duration of the leds.
Definition at line 77 of file dcp.h.
Referenced by GetBlockName().
|
inlineconstexpr |
Default flash duration of the leds.
Definition at line 75 of file dcp.h.
Referenced by GetBlockName().
|
inline |
DCP Hello multicast destination MAC.
Definition at line 57 of file dcp.h.
Referenced by SendHello(), and TEST().
|
inlineconstexpr |
Bit mask indicating an IP address conflict.
Definition at line 80 of file dcp.h.
Referenced by HasConflict().
|
inlineconstexpr |
|
inlineconstexpr |
Maximum allowed length in bytes for a station name.
Definition at line 60 of file dcp.h.
Referenced by BuildSetParamRequest(), TEST(), and TEST().
|
inline |
DCP Identify/Get/Set multicast destination MAC.
Definition at line 55 of file dcp.h.
Referenced by SendDiscover(), SendRequest(), TEST(), and profinet::rpc::TEST_F().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |