public static YamlNode ToYaml(this CosemAttributeDescriptor cosemAttributeDescriptor) { return(new YamlMappingNode { { "class-id", cosemAttributeDescriptor.ClassId.ToDisplayString() }, { "OBIS-code", cosemAttributeDescriptor.InstanceId.ToDisplayString() }, { "attribute-id", cosemAttributeDescriptor.AttributeId.ToDisplayString() } }); }
/// <summary> /// Parses the data from the stream /// </summary> /// <param name="dataStream">The stream to parse from</param> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 02/04/12 RCG 2.70.63 N/A Created public override void Parse(Stream dataStream) { // Parse the Invoke ID and Priority bit first base.Parse(dataStream); // Parse the Get Request Normal specific items DLMSBinaryReader DataReader = new DLMSBinaryReader(dataStream); m_AttributeDescriptor = new CosemAttributeDescriptor(); m_AttributeDescriptor.Parse(dataStream); // The Access Selection is optional so we need to read the usage flag if (DataReader.ReadUsageFlag() == true) { m_AccessSelection = new SelectiveAccessDescriptor(); m_AccessSelection.Parse(dataStream); } else { m_AccessSelection = null; } }
private void _parse() { _cosemAttributeDescriptor = new CosemAttributeDescriptor(m_io, this, m_root); _accessSelection = new SelectiveAccessDescriptorOptional(m_io, this, m_root); }
/// <summary> /// Constructor /// </summary> // Revision History // MM/DD/YY who Version Issue# Description // -------- --- ------- ------ --------------------------------------- // 02/04/12 RCG 2.70.63 N/A Created public GetRequestNormal() { m_AttributeDescriptor = new CosemAttributeDescriptor(); m_AccessSelection = null; }