- added support for Currency BasicType (mapped to visible-string-3 according to tissue 1047)
This commit is contained in:
parent
463b06d3e6
commit
69dbbcf306
9 changed files with 14 additions and 2 deletions
|
@ -116,7 +116,8 @@ typedef enum {
|
|||
IEC61850_GENERIC_BITSTRING = 26,
|
||||
IEC61850_CONSTRUCTED = 27,
|
||||
IEC61850_ENTRY_TIME = 28,
|
||||
IEC61850_PHYCOMADDR = 29
|
||||
IEC61850_PHYCOMADDR = 29,
|
||||
IEC61850_CURRENCY = 30
|
||||
|
||||
|
||||
#if (CONFIG_IEC61850_USE_COMPAT_TYPE_DECLARATIONS == 1)
|
||||
|
|
|
@ -229,6 +229,10 @@ createNamedVariableFromDataAttribute(DataAttribute* attribute)
|
|||
namedVariable->typeSpec.octetString = -64;
|
||||
namedVariable->type = MMS_OCTET_STRING;
|
||||
break;
|
||||
case IEC61850_CURRENCY: /* mapping of Currency BasicType (see tissue 1047) */
|
||||
namedVariable->typeSpec.visibleString = -3;
|
||||
namedVariable->type = MMS_VISIBLE_STRING;
|
||||
break;
|
||||
case IEC61850_VISIBLE_STRING_32:
|
||||
namedVariable->typeSpec.visibleString = -32;
|
||||
namedVariable->type = MMS_VISIBLE_STRING;
|
||||
|
|
|
@ -336,6 +336,7 @@ ConfigFileParser_createModelFromConfigFile(FileHandle fileHandle)
|
|||
case IEC61850_VISIBLE_STRING_65:
|
||||
case IEC61850_VISIBLE_STRING_64:
|
||||
case IEC61850_VISIBLE_STRING_32:
|
||||
case IEC61850_CURRENCY:
|
||||
{
|
||||
char* stringStart = valueIndicator + 2;
|
||||
terminateString(stringStart, '"');
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -55,7 +55,8 @@ public enum AttributeType {
|
|||
GENERIC_BITSTRING(26),
|
||||
CONSTRUCTED(27),
|
||||
ENTRY_TIME(28),
|
||||
PHYCOMADDR(29);
|
||||
PHYCOMADDR(29),
|
||||
CURRENCY(30);
|
||||
|
||||
private int intValue;
|
||||
|
||||
|
@ -107,6 +108,8 @@ public enum AttributeType {
|
|||
return QUALITY;
|
||||
else if (typeString.equals("Timestamp"))
|
||||
return TIMESTAMP;
|
||||
else if (typeString.equals("Currency"))
|
||||
return CURRENCY;
|
||||
else if (typeString.equals("VisString32"))
|
||||
return VISIBLE_STRING_32;
|
||||
else if (typeString.equals("VisString64"))
|
||||
|
|
|
@ -134,6 +134,7 @@ public class DataModelValue {
|
|||
case VISIBLE_STRING_65:
|
||||
case VISIBLE_STRING_129:
|
||||
case VISIBLE_STRING_255:
|
||||
case CURRENCY:
|
||||
this.value = (Object) value;
|
||||
break;
|
||||
case CHECK:
|
||||
|
|
|
@ -376,6 +376,7 @@ public class DynamicModelGenerator {
|
|||
case UNICODE_STRING_255:
|
||||
output.print("=\"" + value.getValue()+ "\"");
|
||||
break;
|
||||
case CURRENCY:
|
||||
case VISIBLE_STRING_32:
|
||||
case VISIBLE_STRING_64:
|
||||
case VISIBLE_STRING_129:
|
||||
|
|
|
@ -767,6 +767,7 @@ public class StaticModelGenerator {
|
|||
case VISIBLE_STRING_129:
|
||||
case VISIBLE_STRING_255:
|
||||
case VISIBLE_STRING_65:
|
||||
case CURRENCY:
|
||||
buffer.append("MmsValue_newVisibleString(\"" + value.getValue() + "\");");
|
||||
break;
|
||||
case FLOAT32:
|
||||
|
|
Loading…
Add table
Reference in a new issue