Skip to content

Commit c700e6b

Browse files
azoitlMartinMelikMerkumians
authored andcommitted
Commented not fully implemented CipEpathEncodeConnectionEpath
As this method leads to compile issues for now I commented it.
1 parent 1e99582 commit c700e6b

2 files changed

Lines changed: 54 additions & 54 deletions

File tree

source/src/cip/cipepath.c

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -628,56 +628,56 @@ LogicalSegmentLogicalFormat CipEpathGetNeededLogicalFormatForValue(
628628
return logical_format;
629629
}
630630

631-
//TODO: Does not match the actual interface anymore, check how to fix
632-
size_t CipEpathEncodeConnectionEpath(
633-
const CipConnectionPathEpath *const connection_epath,
634-
CipOctet **encoded_path) {
635-
636-
size_t encoded_path_length = 0;
637-
{
638-
SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
639-
SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
640-
*encoded_path);
641-
LogicalSegmentLogicalFormat logical_value =
642-
CipEpathGetNeededLogicalFormatForValue(connection_epath->class_id);
643-
SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
644-
encoded_path_length += 1;
645-
MoveMessageNOctets(1, (const CipOctet **) encoded_path);
646-
CipEpathSetLogicalValue(connection_epath->class_id,
647-
logical_value,
648-
encoded_path);
649-
}
650-
651-
{
652-
SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
653-
SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
654-
*encoded_path);
655-
LogicalSegmentLogicalFormat logical_value =
656-
CipEpathGetNeededLogicalFormatForValue(connection_epath->instance_id);
657-
SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
658-
encoded_path_length += 1;
659-
MoveMessageNOctets(1, (const CipOctet **) encoded_path);
660-
CipEpathSetLogicalValue(connection_epath->instance_id,
661-
logical_value,
662-
encoded_path);
663-
}
664-
665-
if(0 != connection_epath->attribute_id_or_connection_point) {
666-
SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
667-
SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
668-
*encoded_path);
669-
LogicalSegmentLogicalFormat logical_value =
670-
CipEpathGetNeededLogicalFormatForValue(
671-
connection_epath->attribute_id_or_connection_point);
672-
SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
673-
encoded_path_length += 1;
674-
MoveMessageNOctets(1, (const CipOctet **) encoded_path);
675-
CipEpathSetLogicalValue(connection_epath->attribute_id_or_connection_point,
676-
logical_value,
677-
encoded_path);
678-
}
679-
return encoded_path_length += 1;
680-
}
631+
////TODO: Does not match the actual interface anymore, check how to fix
632+
//size_t CipEpathEncodeConnectionEpath(
633+
// const CipConnectionPathEpath *const connection_epath,
634+
// CipOctet **encoded_path) {
635+
//
636+
// size_t encoded_path_length = 0;
637+
// {
638+
// SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
639+
// SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
640+
// *encoded_path);
641+
// LogicalSegmentLogicalFormat logical_value =
642+
// CipEpathGetNeededLogicalFormatForValue(connection_epath->class_id);
643+
// SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
644+
// encoded_path_length += 1;
645+
// MoveMessageNOctets(1, (ENIPMessage * const) *encoded_path);
646+
// CipEpathSetLogicalValue(connection_epath->class_id,
647+
// logical_value,
648+
// *encoded_path);
649+
// }
650+
//
651+
// {
652+
// SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
653+
// SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
654+
// *encoded_path);
655+
// LogicalSegmentLogicalFormat logical_value =
656+
// CipEpathGetNeededLogicalFormatForValue(connection_epath->instance_id);
657+
// SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
658+
// encoded_path_length += 1;
659+
// MoveMessageNOctets(1, (const CipOctet **) encoded_path);
660+
// CipEpathSetLogicalValue(connection_epath->instance_id,
661+
// logical_value,
662+
// encoded_path);
663+
// }
664+
//
665+
// if(0 != connection_epath->attribute_id_or_connection_point) {
666+
// SetPathSegmentType(kSegmentTypeLogicalSegment, *encoded_path);
667+
// SetPathLogicalSegmentLogicalType(kLogicalSegmentLogicalTypeClassId,
668+
// *encoded_path);
669+
// LogicalSegmentLogicalFormat logical_value =
670+
// CipEpathGetNeededLogicalFormatForValue(
671+
// connection_epath->attribute_id_or_connection_point);
672+
// SetPathLogicalSegmentLogicalFormat(logical_value, *encoded_path);
673+
// encoded_path_length += 1;
674+
// MoveMessageNOctets(1, (const CipOctet **) encoded_path);
675+
// CipEpathSetLogicalValue(connection_epath->attribute_id_or_connection_point,
676+
// logical_value,
677+
// encoded_path);
678+
// }
679+
// return encoded_path_length += 1;
680+
//}
681681

682682
bool CipEpathEqual(const CipOctet *const path1,
683683
const CipUint path1_length,

source/src/cip/cipepath.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ SymbolicSegmentExtendedFormat GetPathSymbolicSegmentExtendedFormat(
379379
const unsigned char *const cip_path);
380380

381381
/* Special purpose encoding and decoding functions */
382-
383-
size_t CipEpathEncodeConnectionEpath(
384-
const CipConnectionPathEpath *const connection_epath,
385-
CipOctet **encoded_path);
382+
//TODO currently not fully implemented
383+
//size_t CipEpathEncodeConnectionEpath(
384+
// const CipConnectionPathEpath *const connection_epath,
385+
// CipOctet **encoded_path);
386386

387387
bool CipEpathEqual(const CipOctet *const path1,
388388
const CipUint path1_length,

0 commit comments

Comments
 (0)