| 330 | } |
| 331 | |
| 332 | const CipDword CipEpathGetLogicalValue(const EipUint8 **message) { |
| 333 | LogicalSegmentLogicalFormat logical_format = |
| 334 | GetPathLogicalSegmentLogicalFormat(*message); |
| 335 | CipDword data = 0; |
| 336 | MoveMessageNOctets(1, message); /* Move to logical value */ |
| 337 | switch (logical_format) { |
| 338 | case kLogicalSegmentLogicalFormatEightBit: |
| 339 | data = GetSintFromMessage(message); |
| 340 | break; |
| 341 | case kLogicalSegmentLogicalFormatSixteenBit: |
| 342 | MoveMessageNOctets(1, message); /* Pad byte needs to be skipped */ |
| 343 | data = GetIntFromMessage(message); |
| 344 | break; |
| 345 | case kLogicalSegmentLogicalFormatThirtyTwoBit: |
| 346 | MoveMessageNOctets(1, message); /* Pad byte needs to be skipped */ |
| 347 | data = GetDintFromMessage(message); |
| 348 | break; |
| 349 | default: |
| 350 | OPENER_ASSERT(false) /* shall not happen! */ |
| 351 | break; |
| 352 | } |
| 353 | return data; |
| 354 | } |
| 355 | |
| 356 | size_t CipEpathSetLogicalValue(const CipDword logical_value, |
| 357 | const LogicalSegmentLogicalFormat logical_format, |
no test coverage detected