- client: added function IedConnection_readInt64Value

pull/6/head
Michael Zillgith 9 years ago
parent 291653a38d
commit 245a21b129

@ -762,7 +762,7 @@ IedConnection_readInt32Value(IedConnection self, IedClientError* error, const ch
{
MmsValue* value = IedConnection_readObject(self, error, objectReference, fc);
int32_t retVal = 0.f;
int32_t retVal = 0;
if (value != NULL) {
if ((MmsValue_getType(value) == MMS_INTEGER) || (MmsValue_getType(value) == MMS_UNSIGNED))
@ -803,6 +803,29 @@ IedConnection_readUnsigned32Value(IedConnection self, IedClientError* error, con
return retVal;
}
int64_t
IedConnection_readInt64Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc)
{
MmsValue* value = IedConnection_readObject(self, error, objectReference, fc);
int64_t retVal = 0;
if (value != NULL) {
if ((MmsValue_getType(value) == MMS_INTEGER) || (MmsValue_getType(value) == MMS_UNSIGNED))
retVal = MmsValue_toInt64(value);
else {
if (MmsValue_getType(value) == MMS_DATA_ACCESS_ERROR)
*error = iedConnection_mapDataAccessErrorToIedError(MmsValue_getDataAccessError(value));
else
*error = IED_ERROR_UNEXPECTED_VALUE_RECEIVED;
}
MmsValue_delete(value);
}
return retVal;
}
Timestamp*
IedConnection_readTimestampValue(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc,
Timestamp* timeStamp)

@ -1186,6 +1186,19 @@ IedConnection_readStringValue(IedConnection self, IedClientError* error, const c
int32_t
IedConnection_readInt32Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
/**
* \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as int64_t
*
* \param self the connection object to operate on
* \param error the error code if an error occurs
* \param object reference of the data attribute to read
* \param fc the functional constraint of the data attribute to read
*
* \return an int64_t value of the read data attributes
*/
int64_t
IedConnection_readInt64Value(IedConnection self, IedClientError* error, const char* objectReference, FunctionalConstraint fc);
/**
* \brief read a functional constrained data attribute (FCDA) of type Integer or Unsigned and return the result as uint32_t
*

@ -557,3 +557,4 @@ EXPORTS
FileSystem_writeFile
MmsConnection_obtainFile
IedConnection_setFile
IedConnection_readInt64Value

@ -635,3 +635,4 @@ EXPORTS
FileSystem_writeFile
MmsConnection_obtainFile
IedConnection_setFile
IedConnection_readInt64Value

Loading…
Cancel
Save