internal override NodeBase FindNodeByValue(scsm_MMS_TypeEnum dataType, object dataValue, ref NodeBase ContinueAfter) { if (dataValue == null) { return(null); } NodeBase res = null; if (_childNodes.Count > 0) { foreach (NodeBase b in _childNodes) { res = b.FindNodeByValue(dataType, dataValue, ref ContinueAfter); if (res != null && ContinueAfter == null) { return(res); } if (res != null && ContinueAfter != null && res == ContinueAfter) { ContinueAfter = null; } } } else { if (dataType == this.DataType && this.DataValue != null && dataValue.ToString() == DataValue.ToString()) { return(this); } } return(null); }
int MapLibiecType(scsm_MMS_TypeEnum DataType) { int type = 0; switch (DataType) { case scsm_MMS_TypeEnum.boolean: type = (int)LibIecDataAttributeType.BOOLEAN; break; case scsm_MMS_TypeEnum.floating_point: type = (int)LibIecDataAttributeType.FLOAT32; break; case scsm_MMS_TypeEnum.utc_time: type = (int)LibIecDataAttributeType.TIMESTAMP; break; case scsm_MMS_TypeEnum.bit_string: type = (int)LibIecDataAttributeType.CODEDENUM; if (Name == "q") { type = (int)LibIecDataAttributeType.QUALITY; } break; case scsm_MMS_TypeEnum.integer: type = (int)LibIecDataAttributeType.INT32; break; case scsm_MMS_TypeEnum.unsigned: type = (int)LibIecDataAttributeType.INT32U; break; case scsm_MMS_TypeEnum.binary_time: type = (int)LibIecDataAttributeType.ENTRY_TIME; break; case scsm_MMS_TypeEnum.mMSString: type = (int)LibIecDataAttributeType.UNICODE_STRING_255; break; case scsm_MMS_TypeEnum.visible_string: type = (int)LibIecDataAttributeType.VISIBLE_STRING_255; break; case scsm_MMS_TypeEnum.octet_string: type = (int)LibIecDataAttributeType.OCTET_STRING_64; break; } return(type); }
internal virtual NodeBase FindNodeByValue(scsm_MMS_TypeEnum dataType, object dataValue, ref NodeBase ContinueAfter) { if (dataValue == null) { return(null); } NodeBase res = null; if (_childNodes.Count > 0) { foreach (NodeBase b in _childNodes) { res = b.FindNodeByValue(dataType, dataValue, ref ContinueAfter); if (res != null && ContinueAfter == null) { return(res); } } } return(null); }