Skip to content

Commit

Permalink
Merge pull request #27 from fledge-iot/1.9.2RC
Browse files Browse the repository at this point in the history
1.9.2RC
  • Loading branch information
dianomicbot authored Oct 4, 2021
2 parents 1faa651 + 11819c5 commit 60b85f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.1
1.9.2
10 changes: 4 additions & 6 deletions opcua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void OPCUAServer::addDatapoint(string& assetName, Node& obj, string& name, Datap
}
else if (value.getType() == DatapointValue::T_STRING)
{
Node myvar = obj.AddVariable(m_idx, name, value.toString());
Node myvar = obj.AddVariable(m_idx, name, value.toStringValue());
DataValue dv = myvar.GetDataValue();
dv.SourceTimestamp = DateTime::FromTimeT(userTS.tv_sec, userTS.tv_usec);
dv.Encoding |= DATA_VALUE_SOURCE_TIMESTAMP;
Expand Down Expand Up @@ -323,7 +323,7 @@ void OPCUAServer::updateDatapoint(string& assetName, Node& obj, string& name, Da
else if (value.getType() == DatapointValue::T_STRING)
{
DataValue dv = var.GetDataValue();
dv.Value = Variant(value.toString());
dv.Value = Variant(value.toStringValue());
dv.SourceTimestamp = DateTime::FromTimeT(userTS.tv_sec, userTS.tv_usec);
dv.Encoding |= DATA_VALUE_SOURCE_TIMESTAMP;
var.SetValue(dv);
Expand Down Expand Up @@ -383,8 +383,7 @@ OpcUa::Node& OPCUAServer::findParent(const Reading *reading)
if (m_hierarchy[j].getName().compare(name) == 0)
{
DatapointValue value = datapoints[i]->getData();
string svalue = value.toString();
svalue = svalue.substr(1, svalue.length() - 2);
string svalue = value.toStringValue();
OpcUa::Node opcNode;
auto it = m_parents.find(svalue);
if (it != m_parents.end())
Expand Down Expand Up @@ -425,8 +424,7 @@ OpcUa::Node& OPCUAServer::findParent(const vector<NodeTree>& hierarchy, const Re
if (hierarchy[j].getName().compare(name) == 0)
{
DatapointValue value = datapoints[i]->getData();
string svalue = value.toString();
svalue = svalue.substr(1, svalue.length() - 2);
string svalue = value.toStringValue();
string newkey = key.append("/");
newkey = newkey.append(svalue);
OpcUa::Node opcNode;
Expand Down
2 changes: 1 addition & 1 deletion plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" {
/**
* Plugin specific default configuration
*/
const char *default_config = QUOTE({
static const char *default_config = QUOTE({
"plugin" : {
"description" : "OPCUA Server",
"type" : "string",
Expand Down

0 comments on commit 60b85f4

Please sign in to comment.