Giter VIP home page Giter VIP logo

Comments (19)

wsobel avatar wsobel commented on August 27, 2024

from cppagent.

EMPreethi avatar EMPreethi commented on August 27, 2024

I observed that Device XML file is not rewritten instead i saw changes only in REST output.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Set VersionDeviceXml = true. That will update the device xml.

from cppagent.

EMPreethi avatar EMPreethi commented on August 27, 2024

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.

Adapter_uuid_output

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.

wsobel avatar wsobel commented on August 27, 2024

Please attach or upload the Device xml. I want to see if the original ids are being serialized.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

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.

EMPreethi avatar EMPreethi commented on August 27, 2024

Attached a devices XML file :
devices.txt

adapter SHDR :
adapter_test.txt

Thanks

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

I'll test this, not sure what is going wrong.

from cppagent.

EMPreethi avatar EMPreethi commented on August 27, 2024

Few of the observation I found:

  1. 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.

wsobel avatar wsobel commented on August 27, 2024

I'll check in the protocol comment for * uuid. I think I have enough to reproduce the issue.

Thanks

  • W

from cppagent.

EMPreethi avatar EMPreethi commented on August 27, 2024

@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.

wsobel avatar wsobel commented on August 27, 2024

from cppagent.

emprarthanak avatar emprarthanak commented on August 27, 2024

@wsobel
Built the image using latest code that's been merged and found that

  1. The latest code, now does not work as expected when * uuid: smart_9845_new command is sent and preserveUUID = 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
  1. It works fine when preserveUUID = true and * uuid: smart_9845_new command is sent

Thanks

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Reopening this issue to find problem.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Made some final changes to support preserve uuid. was not setting preserve in the adapter config for associated device.

from cppagent.

emprarthanak avatar emprarthanak commented on August 27, 2024

@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.

Screenshot from 2024-04-05 14-09-31

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.

wsobel avatar wsobel commented on August 27, 2024

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.

emprarthanak avatar emprarthanak commented on August 27, 2024

@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.

wsobel avatar wsobel commented on August 27, 2024

Checking this again with preserve uuid false.

from cppagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.