Comments (19)
from cppagent.
I observed that Device XML file is not rewritten instead i saw changes only in REST output.
from cppagent.
Set VersionDeviceXml = true
. That will update the device xml.
from cppagent.
Set
VersionDeviceXml = true
. That will update the device xml.
if VersionDeviceXml = true
, I see UUID is overwritten in device XML file along with that i am sending SHDR data for all data items but status is shown as UNAVAILABLE.
When I refer to agent logs, looks like it is not able to identify data items but it is already defined in XML file.
device XML :
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/styles/styles.xsl"?>
<MTConnectDevices xmlns:m="urn:mtconnect.org:MTConnectDevices:2.0" xmlns="urn:mtconnect.org:MTConnectDevices:2.0" xmlns:xsi="
[http://www.w3.org/2001/XMLSchema-instance"](http://www.w3.org/2001/XMLSchema-instance%22)
xsi:schemaLocation="urn:mtconnect.org:MTConnectDevices:2.0 /schemas/MTConnectDevices_2.0.xsd">
<Header creationTime="2024-03-07T04:30:27Z" sender="e2c573fd5e38" instanceId="0" version="2.3.0.2" deviceModelChangeTime="2024-03-07T04:30:26.367824Z" assetBufferSize="0" assetCount="0" bufferSize="0"/>
<Devices>
<Device id="saw" name="Saw" uuid="smartAdapter_9845">
<Description manufacturer="omron">SmartSaw</Description>
<Configuration>
<CoordinateSystems>
<CoordinateSystem id="world_coordinates" type="WORLD">
<Transformation>
Why agent is not able to identify SHDR data items when UUID changes ?
from cppagent.
Please attach or upload the Device xml. I want to see if the original ids are being serialized.
from cppagent.
Can you also attach or paste the shdr from the adapter. I want to see or check what's happening in the two.
from cppagent.
Attached a devices XML file :
devices.txt
adapter SHDR :
adapter_test.txt
Thanks
from cppagent.
I'll test this, not sure what is going wrong.
from cppagent.
Few of the observation I found:
- Looks like after handling UUID command, agent does not updates to new UUID value even though it is changing in REST output.
Default UUID defined in XML File : smart_9845
command sent is* uuid : smart_9845_new
2024-03-11T06:53:14.697026Z (0x00007f047f4ebb38) [error] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->ShdrAdapter::protocolCommand: _1a67104bd6:Received protocol command 'description' for device 'smart_9845', but the device could not be found
2024-03-11T06:53:14.697043Z (0x00007f047f4ebb38) [debug] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->ShdrAdapter::protocolCommand: Processing command: manufacturer: omron
2024-03-11T06:53:14.697051Z (0x00007f047f4ebb38) [warning] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->ShdrAdapter::protocolCommand: _1a67104bd6: Cannot find device for name smart_9845
2024-03-11T06:53:14.697059Z (0x00007f047f4ebb38) [error] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->ShdrAdapter::protocolCommand: _1a67104bd6:Received protocol command 'manufacturer' for device 'smart_9845', but the device could not be found
2.Adding Device
configuration within Adapter block results in agent identifying every data item and handling command properly.
Adapters {
Saw {
Device = Saw
RealTime = false
Protocol = shdr
Host = 192.168.88.105
Port = 9800
PreserveUUID = false
}
}
If above Device
config is not added, then streaming * device: Saw
command from Adapter will also results in agent identifying every data items.
Thank you
from cppagent.
I'll check in the protocol comment for * uuid. I think I have enough to reproduce the issue.
Thanks
- W
from cppagent.
@wsobel
When preserveUUID = true
and a new UUID is sent from Adapter , I expected that Agent ignore the new UUID and should handle the SHDR data as normal
Based on my observation, it seems that the Agent is not handling the SHDR data properly when a new UUID is sent.
024-03-06T09:30:53.442189Z (0x00007fccfd8b9b38) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: y1_abs
2024-03-06T09:30:53.442200Z (0x00007fccfd8b9b38) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: 0.000000
2024-03-06T09:30:53.442211Z (0x00007fccfd8b9b38) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: y1_axis_interlock
Should the agent ignore the UUID command, or should it consider it as a new device?
from cppagent.
from cppagent.
@wsobel
Built the image using latest code that's been merged and found that
- The latest code, now does not work as expected when
* uuid: smart_9845_new
command is sent andpreserveUUID = false
. The uuid gets updated and shown in REST output but shows all dataitems as UNAVAILABLE
2024-04-02T09:09:12.261443Z (0x00007fe9490f4640) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: x0_target
2024-04-02T09:09:12.261450Z (0x00007fe9490f4640) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: 0.000000
2024-04-02T09:09:12.261456Z (0x00007fe9490f4640) [trace] Connector::reader->Connector::parseSocketBuffer->Connector::processLine->ShdrAdapter::processData->DataItemMapper.ShdrTokenMapper.operator->DataItemMapper.ShdrTokenMapper.mapTokensToDataItem: Could not find data item: x0_abs
- It works fine when
preserveUUID = true
and* uuid: smart_9845_new
command is sent
Thanks
from cppagent.
Reopening this issue to find problem.
from cppagent.
Made some final changes to support preserve uuid. was not setting preserve in the adapter config for associated device.
from cppagent.
@wsobel
Observed that the issue still exists as when command * uuid: smart_9845_new
command is sent and preserveUUID = false
, uuid is updated in REST output. I am sending SHDR data for all data items but status is shown as UNAVAILABLE.
When I refer to agent logs, looks like it is not able to identify data items but it is already defined in XML file
from cppagent.
I was not getting that behavior. Can you upload them device xml, the log file, the cfg, and the adapter data. I tried with the previous data and it worked.
from cppagent.
@wsobel
The previous may be working because the default device defined in the xml is matching with uuid sent as command
Attached xml file, cfg and adapter data for your reference
devices_xml.txt
adapter_test.txt
Devices = devices.xml
ServerIP = 0.0.0.0
Port = 5000
AllowPut = false
AllowPutFrom = localhost
ReconnectInterval = 1000
WorkerThreads = 2
BufferSize = 17
MaxAssets = 8096
IgnoreTimestamps = true
SchemaVersion = 2.0
ShdrVersion = 2.0 # Set Default on all Adapters
JsonVerson = 2.0
SuppressIPAddress = true
MonitorConfigFiles = true
ConversionRequired = false
UpcaseDataItemValue = true
EnableSourceDeviceModels = false
VersionDeviceXml = false
Pretty = true
Adapters {
Saw {
RealTime = false
Protocol = shdr
Host = 192.168.88.105
Port = 9800
PreserveUUID = false
}
}
from cppagent.
Checking this again with preserve uuid false.
from cppagent.
Related Issues (20)
- Agent Reconnecting to Broker repeatedly HOT 21
- Condition ID format and example not matching on Agent version 2.3? HOT 25
- DELETEing an already deleted asset responds with old asset value; expected MTConnectError HOT 14
- Check why asset counts are not being reported in agent HOT 3
- json schema for agent cfg HOT 13
- Add pretty handling to assets
- Query Regarding FlatMode Configuration in MTConnect CPP Agent HOT 9
- Add header to Asset documents in 2.5
- Agent is suddenly closing itself HOT 23
- Cannot start service when cfg file has different name than default HOT 7
- MQTT Adapter disconnect HOT 25
- MQTT Ingress URL error HOT 6
- MTConnect Agent version 2.3.0.13 runs different devices.xml HOT 1
- Probe not received on device UUID change. HOT 6
- Add configurable MQTT Retain flag
- v2.3.0.14 - MQTT adapter port hard coded in source (1883) HOT 15
- Agent Crash when configured for TWO adapters HOT 9
- Agent to Agent Connection: Filtering not working HOT 4
- Agent cannot parse json asset HOT 1
- Alpine docker build fails HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppagent.