mtconnect / cppagent

C++ Agent toolkit - Pre-built binaries, visit: https://github.com/mtconnect/cppagent/releases Docker images available at https://hub.docker.com/repositories/mtconnect
http://mtcup.org/
Apache License 2.0
141 stars 90 forks source link

How to set initial dataitem value in the stream #440

Closed neildes2 closed 4 months ago

neildes2 commented 5 months ago

How can i get a value loaded into a dataitem that never changes. Like a Constant. I tried initial value in the example below but it doesn't seem to be its intention.

Specification values are not reported in the stream.

           <DataItem id="Pcount" type="PART_COUNT" category="SAMPLE" units="COUNT">
              <InitialValue>125</InitialValue>  
            </DataItem>
wsobel commented 4 months ago

I'll check to make sure it's working.

wsobel commented 4 months ago

We need to decide on the behavior. When the device is unavailable it should be unavailable. When the device becomes available it will assume the initial value.