Comments (25)
from cppagent.
Devices = Devices.xml
AllowPut = true
AllowPutFrom = localhost
Port = 5000
ReconnectInterval = 1000
BufferSize = 17
MaxAssets = 1024
SchemaVersion = 2.3
ShdrVersion = 1
SuppressIPAddress = false
MonitorConfigFiles = false
WorkerThreads = 2
JsonVersion = 1
DisableAgentDevice = false
ConversionRequired = true
IgnoreTimestamps = true
Pretty = true
PreserveUUID=true
FilterDuplicates=yes
Adapters {
machine1 {
Url = mqtt://127.0.0.1/
MqttPort = 1883
MqttUserName = user1
MqttPassword = "p1"
Topics = "machine1/ingress/#"
MqttClientId = client-1
}
}
Logger Configuration
logger_config
{
logging_level = trace
}
from cppagent.
shdr adapter disconnect sets all tags to UNAVAILABLE.
2024-06-13T14:50:00.973341Z (0x000057d4) [debug] Connector::reader->Connector::reconnect->Connector::close: Disconnected from adapter, setting all values to UNAVAILABLE
But mqtt adapter (Broker) disconnect does not.
from cppagent.
Should this be a param? ON/OFF Use case...broker is 2nd adapter for sensors? USe case...Broker is primary adapter and should set all tags to UNAVAILABLE.
Maybe an adapter level parameter 'Primary=true'
Which ever adapter is the primary, if it gets disconnected, it sets all tags to UNAVAILABLE
from cppagent.
This sounds reasonable behavior. I will take a look and see what it is doing now. May be a couple of days.
from cppagent.
The disconnect behavior is built into the agent. Must not be forwarding disconnect from broker signal.
Is this when the broker disconnects or when the source disconnects from the broker?
from cppagent.
In this test case, I pulled the network cable causing the disconnect from the broker. For the shdr test, I just turned off my local adapter.
from cppagent.
Thanks. I'll disconnect my broker and test the behavior.
from cppagent.
@neildes2 Please test
from cppagent.
Downloading and testing now....
from cppagent.
This issue is NOT resolved.
tested on Agent v2.3.0.11
All tags do NOT reset to UNAVAILABLE upon mqtt broker ingest disconnect.
from cppagent.
from cppagent.
when I tested the shdr adapter, the device AVAILABILITY tag went UNAVAILABLE. When I tested with broker adapter, it did not.
from cppagent.
from cppagent.
The shdr adapter, when disconnected, set AVAILABILITY to UNAVAILABLE
from cppagent.
from cppagent.
Just tested v2.3.0.13. When I disable my wireless connection, the broker adapter disconnects and the agent states...."] MqttClientImpl::disconnected: Disconnected from adapter, setting all values to UNAVAILABLE". But the device Tags all remain stale at AVAILABILITY=AVAILABLE and EXECUTION = ACTIVE. Even the AGENT device AVAILABILITY remains AVAILABLE
from cppagent.
Devices = Devices.xml
AgentDeviceUUID = "3519a48b-814b-3425-a12d-ef250947ab3d"
PreserveUUID = true
Port = 5000
BufferSize = 17
MaxAssets = 1024
SchemaVersion = 2.2
ShdrVersion = 1
SuppressIPAddress = false
DisableAgentDevice = false
MonitorConfigFiles = false
WorkerThreads = 2
JsonVersion = 1
ConversionRequired = true
IgnoreTimestamps = true
Pretty = true
HeartBeat = 60000
from cppagent.
Are you using the docker hub image?
from cppagent.
No. Downloading the WINDOWS compiled agent from this repo
from cppagent.
Agent device should be available. If the agent is running.
from cppagent.
If I have TWO adapters defined that feed to one device, and only ONE of them gets disconnected, what happens?
If I have TWO adapters defined that feed to SEPARATE devices, and only ONE of them gets disconnected, what happens?
from cppagent.
If two adapters are associated with the device, the data items set by each adapter will become unavailable if it disconnects. The others will not. Availability is controlled by the first adapter using AutoAvailable=true (default). This will allow the adapter to control the Availability data item.
I think any adapter with AutoAvailable true will try to set Availability when it disconnects. If availability is directly set by an adapter, then it will be associated with only that adapter.
The source of the data and the disconnect only effect the data items associated with the adapter. The code marks all data items and the last adapter they received data from.
from cppagent.
Use AutoAvailable = true
in the adapter config to make the Availability change to UNAVAILABLE
when disconnected.
I found some issues with the adapter data item connection. Just created a new PR.
from cppagent.
works as expected now! Great work.
from cppagent.
Related Issues (20)
- 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 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
- Duplicate DataItem id error for Device File with multiple Devices defined HOT 10
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.