C12Adapter Opensource C++ Interface
MErrorEnum Class Reference

Error enumeration. More...

Inheritance diagram for MErrorEnum:

Public Types

enum  Type {
  Unknown = 0x80040401,
  BadConversion = 0x80040402,
  NoValue = 0x8004040A,
  NumberOutOfRange = 0x80040418,
  IndexOutOfRange = 0x8004041A,
  StringTooLong = 0x80040420,
  ClientApplicationError = 0x8004044D,
  InvalidBaud = 0x80040475,
  UnknownSocketError = 0x8004047F,
  CharactersNotEchoed = 0x8004048B,
  CrcCheckFailed = 0x8004048D,
  C12ServiceResponseOK = 0x80040490,
  C12ServiceResponseERR = 0x80040491,
  C12ServiceResponseSNS = 0x80040492,
  C12ServiceResponseISC = 0x80040493,
  C12ServiceResponseONP = 0x80040494,
  C12ServiceResponseIAR = 0x80040495,
  C12ServiceResponseBSY = 0x80040496,
  C12ServiceResponseDNR = 0x80040497,
  C12ServiceResponseDLK = 0x80040498,
  C12ServiceResponseRNO = 0x80040499,
  C12ServiceResponseISSS = 0x8004049A,
  C12ServiceResponseSME = 0x8004049B,
  C12ServiceResponseUAT = 0x8004049C,
  C12ServiceResponseNETT = 0x8004049D,
  C12ServiceResponseNETR = 0x8004049E,
  C12ServiceResponseRQTL = 0x8004049F,
  C12ServiceResponseRSTL = 0x800404A0,
  C12ServiceResponseSGNP = 0x800404A1,
  C12ServiceResponseSGERR = 0x800404A2,
  C12ServiceResponseNRY = 0x800404B0,
  NoSuchProperty = 0x800404B1,
  InvalidChecksum = 0x800404B4,
  ChannelReadTimeout = 0x800404C3,
  CouldNotConnectByModem = 0x800404C4,
  ModemError = 0x800404C5,
  C12ProcedureResultOK = 0x800404C9,
  C12ProcedureNotCompleted = 0x800404CA,
  C12ProcedureInvalidParameter = 0x800404CB,
  C12ProcedureDeviceConflict = 0x800404CC,
  C12ProcedureTimingConstraint = 0x800404CD,
  C12ProcedureNoAuthorization = 0x800404CE,
  C12ProcedureUnknown = 0x800404CF,
  UnknownItem = 0x800404D4,
  CannotConvertToTableOrFunctionNumber = 0x800404DD,
  ChannelWriteTimeout = 0x800404E9,
  UnknownSystemError = 0x80040503,
  OperationCancelled = 0x800407ED,
  NoSuchService = 0x80040806,
  UnknownStringEscape = 0x8004080B,
  CannotIndexItem = 0x80040812,
  BadBcd = 0x80040814,
  OverflowOrUnderflow = 0x80040822,
  SocketReadTimeout = 0x80040823,
  BadFileFormat = 0x80040826,
  CannotModifyConstantOrReadonly = 0x8004082B,
  EndOfStream = 0x80040831,
  ClassNotFound = 0x80040866,
  UnsupportedType = 0x8004086A,
  CannotWriteToReadonlyStream = 0x80040889,
  CannotReadFromWriteonlyStream = 0x8004088A,
  SocketClosedByPeer = 0x8004088D,
  DataNotValidated = 0x80040899,
  BadStreamFormat = 0x8004089C,
  ProxySocketError = 0x8004089D,
  SocketWriteTimeout = 0x8004089F,
  BadIpAddress = 0x800408A1,
  ReceivedDataSizeDifferent = 0x80040BD5,
  ChannelDisconnectedUnexpectedly = 0x80040BE9,
  ReceivedPacketToggleBitFailure = 0x80040C17,
  DeviceReportedBadPacketCRC = 0x80040D50,
  PossibleTamperingDetected = 0x80040D56,
  CollisionDetected = 0x8004180B,
  ChannelConnectTimeout = 0x8004180E
}
 Actual enumeration type. More...
 

Additional Inherited Members

- Public Member Functions inherited from MObject
virtual ~MObject ()
 Object destructor.
 
virtual const MClassGetClass () const =0
 Get the final class of the object. More...
 
virtual unsigned GetEmbeddedSizeof () const
 For embedded object types, return the size of the class. More...
 
bool IsEmbeddedObject () const
 Tell if the object is of embedded kind. More...
 
SHOW_INTERNAL MVariant Call (const MStdString &name, const MVariant &params)
 Call the object service with parameters, given as variant. More...
 
MVariant Call0 (const MStdString &name)
 Call the object service with no parameters. More...
 
MVariant Call1 (const MStdString &name, const MVariant &p1)
 Call the object service with one parameter. More...
 
MVariant Call2 (const MStdString &name, const MVariant &p1, const MVariant &p2)
 Call the object service with two parameter. More...
 
MVariant Call3 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3)
 Call the object service with three parameter. More...
 
MVariant Call4 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4)
 Call the object service with four parameter. More...
 
MVariant Call5 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4, const MVariant &p5)
 Call the object service with five parameter. More...
 
MVariant Call6 (const MStdString &name, const MVariant &p1, const MVariant &p2, const MVariant &p3, const MVariant &p4, const MVariant &p5, const MVariant &p6)
 Call the object service with six parameter. More...
 
virtual MVariant CallV (const MStdString &name, const MVariant::VariantVector &params)
 Call the object service with parameters, given as variant vector. More...
 
virtual bool IsPropertyPresent (const MStdString &name) const
 Tell if the property with the given name exists.
 
virtual bool IsServicePresent (const MStdString &name) const
 Tell if the service with the given name exists.
 
virtual MVariant GetProperty (const MStdString &name) const
 Get the property value using name of the property. More...
 
virtual void SetProperty (const MStdString &name, const MVariant &value)
 Set the property using name of the property, and value. More...
 
virtual MStdStringVector GetAllPropertyNames () const
 Return the list of publicly available properties, persistent or not. More...
 
virtual MStdStringVector GetAllPersistentPropertyNames () const
 Return the list of persistent properties. More...
 
virtual void SetPersistentPropertiesToDefault ()
 Set the persistent properties of the object to their default values. More...
 
virtual MVariant GetPersistentPropertyDefaultValue (const MStdString &name) const
 Get the default value of persistent property with the name given. More...
 
virtual void SetPersistentPropertyToDefault (const MStdString &name)
 Set the persistent property with the name given to default value. More...
 
virtual const char * GetType () const
 Get the name of the type for the object (could be the same as class name).
 
virtual void SetType (const MStdString &)
 Intentionally, it will set the name of the type for the object, but the service will not allow setting the name to anything other than the current name. More...
 
virtual void Validate ()
 Validate internal structures of the object. More...
 
- Static Public Member Functions inherited from MObject
static const MClassGetStaticClass ()
 Get the declared class of this particular object. More...
 
static bool IsClassPresent (const MStdString &name)
 Tells if the given class name is available. More...
 
- Static Public Attributes inherited from MObject
static const MClass s_class
 Class of MObject.
 
- Protected Member Functions inherited from MObject
 MObject ()
 Object constructor, protected as the class is abstract.
 
void DoSetPersistentPropertiesToDefault (const MClass *staticClass)
 Set the persistent properties to their default values for one object provided the class for that object. More...
 

Detailed Description

Error enumeration.

Member Enumeration Documentation

Actual enumeration type.

Enumerator
Unknown 

Unknown error.

Text: "Unknown error"

This is most likely the hard unrecoverable application error such as General Protection Fault, etc.

BadConversion 

Bad conversion error.

  • Text: "Could not convert '%s' to a single character"
  • Text: "Could not convert byte string %d bytes long to a single character"
  • Text: "Could not convert byte string %d bytes long to integer, four bytes expected"
  • Text: "Could not convert byte string %d bytes long to unsigned integer, four bytes expected"
  • Text: "Could not convert byte string %d bytes long to floating point number, eight bytes expected"
  • Text: "Could not convert '%s' to integer"
  • Text: "Could not convert '%s' to unsigned integer"
  • Text: "Could not convert '%s' to floating point number"
  • Text: "Could not convert variant to object reference"
  • Text: "Could not convert variant containing object reference to a character"
  • Text: "Could not convert variant containing object reference to a numeric value"
  • Text: "Could not convert variant containing object reference to a string value"
  • Text: "Could not convert 64-bit unsigned integer to '%s'"
  • Text: "Could not convert 64-bit signed integer to '%s'"
NoValue 

No value is present.

  • Text: "No value exists"
  • Text: "No value given for '%s'"

This would be thrown if a variable has no value. For example, this would signify the variable was not initialized previously.

NumberOutOfRange 

Number is out of range.

  • Text: "Value %s for '%s' is out of range %s .. %s"
IndexOutOfRange 

Index is out of range.

  • Text: "Index %d for '%s' is out of range %d .. %d"
  • Text: "Index %d is out of range %d .. %d"
StringTooLong 

String is too long.

  • Text: "Line %d in file '%s' is too long"
  • Text: "String of %d characters is too long for '%s', which has size %d"
ClientApplicationError 

Generic error in a client application.

  • Text: "Error in a client application"

This error is a default one thrown when no error code is given. Like when there is THROW "My Message", the error code of the exception will be this one.

InvalidBaud 

Invalid or unsupported baud.

  • Text: "Invalid or unsupported baud rate %u"
  • Text: "Meter requested invalid or unsupported baud rate with code 0x%X"
UnknownSocketError 

Unknown socket error.

  • Text: "Unknown socket error"
CharactersNotEchoed 

Text: "Characters echoed did not match ones sent. Not a current loop device?".

This error will result when the echo is set for the channel, but the received characters did not match those which are sent.

CrcCheckFailed 

Text: "CRC check failed".

C12ServiceResponseOK 

Text for this error does not exist.

This error code can be used to derive C12 service response from error code, as it will be much easier than parsing an error code from message text. This error can still occur in the future in a rare hypothetical condition at which an OK is actually an error.

C12ServiceResponseERR 

Text: "0x%02X Error, no reason provided (ERR)".

Thrown by C12 protocol service

C12ServiceResponseSNS 

Text: "0x%02X Service Not Supported (SNS)".

Thrown by C12 protocol service

C12ServiceResponseISC 

Text: "0x%02X Insufficient Security Clearance (ISC)".

Thrown by C12 protocol service

C12ServiceResponseONP 

Text: "0x%02X Operation Not Possible (ONP)".

Thrown by C12 protocol service

C12ServiceResponseIAR 

Text: "0x%02X Inappropriate Action Requested (IAR)".

Thrown by C12 protocol service

C12ServiceResponseBSY 

Text: "0x%02X Device Busy (BSY)".

Thrown by C12 protocol service

C12ServiceResponseDNR 

Text: "0x%02X Data Not Ready (DNR)".

Thrown by C12 protocol service

C12ServiceResponseDLK 

Text: "0x%02X Data Locked (DLK)".

Thrown by C12 protocol service

C12ServiceResponseRNO 

Text: "0x%02X Renegotiate (RNO)".

Thrown by C12 protocol service

C12ServiceResponseISSS 

Text: "0x%02X Invalid Service Sequence State (ISSS)".

Thrown by C12 protocol service

C12ServiceResponseSME 

Text: "0x%02X Security mechanism error detected (SME)".

Thrown by C12 protocol service

C12ServiceResponseUAT 

Text: "0x%02X Unknown or invalid Called ApTitle is received (UAT)".

Thrown by C12 protocol service

C12ServiceResponseNETT 

Text: "0x%02X Network timeout detected (NETT)".

Thrown by C12 protocol service

C12ServiceResponseNETR 

Text: "0x%02X Node is not reachable (NETR)".

Thrown by C12 protocol service

C12ServiceResponseRQTL 

Text: "0x%02X Request too large (RQTL)".

Thrown by C12 protocol service

C12ServiceResponseRSTL 

Text: "0x%02X Response too large (RSTL)".

Thrown by C12 protocol service

C12ServiceResponseSGNP 

Text: "0x%02X Segmentation required, but not possible (SGNP)".

Thrown by C12 protocol service

C12ServiceResponseSGERR 

Text: "0x%02X Segmentation error (SGERR)".

Thrown by C12 protocol service

C12ServiceResponseNRY 

Text: "0x%02X Not registered to you (NRY)".

Not registered to you, code not defined in C12 standard, specific to Elster cNIC devices

NoSuchProperty 

No such property.

  • Text: "'%s' does not have property '%s'"
InvalidChecksum 

Text: "Invalid checksum".

ChannelReadTimeout 

Text: "Channel read timeout (%u bytes read successfully)".

CouldNotConnectByModem 

Text: "Could not connect by modem" Text: "Could not connect by modem (Line is busy)" Text: "Could not connect by modem (Timeout)" Text: "Could not connect by modem (No Dial Tone)" Text: "Could not connect by modem (No Answer)" Text: "Could not connect by modem (No Carrier)".

ModemError 

Text: "Modem responded with error to command" Text: "Modem did not respond or gave an unknown response to command".

C12ProcedureResultOK 

Text: ** no text exists for this procedure result **.

This error code can be used to derive C12 procedure result from error code, as it will be much easier than parsing an error code from message text. This error can still occur in the future in a rare hypothetical condition at which an OK is actually an error.

C12ProcedureNotCompleted 

Text: "Procedure result code 1, Procedure accepted but not fully completed".

This is a retryable code

C12ProcedureInvalidParameter 

Text: "Procedure result code 2, invalid parameter".

C12ProcedureDeviceConflict 

Text: "Procedure result code 3, conflict with the current device setup".

C12ProcedureTimingConstraint 

Text: "Procedure result code 4, had to ignore the procedure due to timing constraint".

C12ProcedureNoAuthorization 

Text: "Procedure result code 5, no authorization to perform this procedure".

C12ProcedureUnknown 

Text: "Procedure result code 6, unrecognized or unsupported procedure".

UnknownItem 

Unknown item.

  • Text: "Item '%s' is unknown"

This is an English-only internal software error.

CannotConvertToTableOrFunctionNumber 

Text: "Cannot convert '%s' function or table number".

Thrown when software attempts to supply table or function number that is of type or value, unsupported by protocol. For example, if the user gives -1 or "abc" as function number to a C12 protocol. This is a software error that will not be shown to end users, English only.

ChannelWriteTimeout 

Text: "Channel write timeout (%u bytes written successfully)".

UnknownSystemError 

Unknown system error.

  • Text: "Unknown system error"
OperationCancelled 

Operation was cancelled by the user or programmatically.

  • Text: "Operation cancelled"
NoSuchService 

Class does not have such service (method)

  • Text: "Class '%s' does not have service with the name '%s'"
UnknownStringEscape 

Unknown string escape sequence.

  • Text: "Unknown string escape sequence with character '%c'"
  • Text: "Unknown string escape sequence with character code 0x%X"
CannotIndexItem 

The given entity cannot be indexed.

  • Text: "Item is not an array or set, and cannot be indexed"

This error is thrown when an array index operation is attempted on object that is not an array or set.

BadBcd 

The given input is not a binary coded decimal number.

Text: "Cannot convert byte with the value 0x%X to BCD"

OverflowOrUnderflow 

Text: "Number %s is too big or too small".

SocketReadTimeout 

Text: "Socket read timeout".

BadFileFormat 

Text: "File '%s' has bad format or it is corrupt".

This error will result when an input file has bad format or its contents is corrupt.

CannotModifyConstantOrReadonly 

Text: "Cannot modify a readonly object" Text: "Attempt to modify a readonly item '%s'".

Software English-only error. This will be thrown if an attempt to modify a constant or readonly object is made.

EndOfStream 

Text: "End of stream".

Unexpected end of stream of file is encountered.

ClassNotFound 

Class not found.

Text: "Class %s not found"

English-only software error that tells the class with such name is not found. For example, this error is thrown when an object is attempted to be created remotely, but such class does not exist in remote server.

UnsupportedType 

Unsupported type.

  • Text: "Unsupported type %d"

This error will typically result at attempt to pass a variant type unsupported by MeteringSDK. Such variant type can come from a COM facade, or other facades. This is an English-only error.

CannotWriteToReadonlyStream 

Cannot write to a read-only stream.

  • Text: "Cannot write to readonly stream '%s'"
CannotReadFromWriteonlyStream 

Cannot read from an write only stream.

  • Text: "Cannot read from writeonly stream '%s'"
SocketClosedByPeer 

Socket connection is closed by peer.

Text: "Socket connection closed by peer"

DataNotValidated 

Text "Data not validated, tampering possible".

BadStreamFormat 

Bad stream format.

  • Text: "Two-byte header expected in stream '%s'"
  • Text: "Encrypted stream '%s' has bad format"
ProxySocketError 

Socket proxy server returned an error.

SocketWriteTimeout 

Socket write timeout.

  • Text: "Socket write timeout"
BadIpAddress 

Text: "Given address is not recognized as IPv4 or IPv6" Text: "Given address is not recognized as IPv4, and there is no IPv6 support installed".

ReceivedDataSizeDifferent 

Text: "Received data size %d is different than requested %d bytes".

This error is thrown when the device supplied data of different size than one requested. For example, when a partial read of three bytes is requested, but the device returned five bytes this error is thrown. Most likely, it signifies a severe problem with the device.

ChannelDisconnectedUnexpectedly 

Text: "Channel disconnected unexpectedly".

ReceivedPacketToggleBitFailure 

Text: "Received packet toggle bit failure, duplicate packet ignored".

DeviceReportedBadPacketCRC 

Text: "Device reported bad packet CRC".

The response from device was signifying a data link layer error, like bad CRC.

PossibleTamperingDetected 

Text: "Device gave insecure response on a secured request, tampering is suspected" Text: "Invocation ID mismatch, tampering is suspected" Text: "Ap title mismatch, tampering is suspected".

CollisionDetected 

Text: "Collision detected by a slave protocol".

ChannelConnectTimeout 

Text: "Failed to connect within %u seconds".