DAIS HDA Value createEmptyValue MicroStamp timeStamp DAIS HDA Value va

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
DAIS::HDA::Value
createEmptyValue(MicroStamp timeStamp)
{
DAIS::HDA::Value value = createEmptyValue;
value.quality.opc_quality = DAIS::OPC_QUALITY_GOOD;
value.quality.user_quality = DAIS::OPC_QUALITY_GOOD; // why not?
value.time_stamp.date_time = timeStamp.first.toTime_t();
value.time_stamp.microseconds = timeStamp.second;
return value;
}
DAIS::HDA::Value
createValue(MicroStamp timeStamp, QString string_value)
{
DAIS::HDA::Value value = createEmptyValue(timeStamp);
value.simple_value.type = GDA::DAFDescriptions::STRING_TYPE;
value.simple_value.v.string_value = string_value; // parameter
return value;
}
DAIS::HDA::Value
createValue(MicroStamp timeStamp, int discrete_value)
{
DAIS::HDA::Value value = createEmptyValue(timeStamp);
value.simple_value.type = GDA::DAFDescriptions::INT_TYPE;
value.simple_value.v.int_value = discrete_value; // parameter
return value;
}
DAIS::HDA::Value
createValue(MicroStamp timeStamp, double analog_value)
{
DAIS::HDA::Value value = createEmptyValue(timeStamp);
value.simple_value.type = GDA::DAFDescriptions::DOUBLE_TYPE;
value.simple_value.v.double_value = analog_value; // parameter
return value;
}