Comments (3)
Hi
I now realise where you got the example code from. This is example is pre-CFX agreement. It is from the early days of when we were looking at message structures. I have asked that this example be removed from the documentation.
Currently there is no mechanisium for adding alternative State enumerations. Having said that we are looking to add new states in V1.1. I already have a list of additional states required. If you let us know what you would like adding the A-team (the CFX overwatch team) will look at them and add as required.
Sorry for the confusion.
Simon
from cfx.
Hi
I am not sure you fully understand the methodology for the StationStateChanged and StageStateChanged messages.
A typical message would be:
{
"OldState": 2200,
"OldStateDuration": "00:01:25",
"NewState": 1100,
"RelatedFault": null
}
Where the OldState and NewState enumerations are defined here. [http://www.connectedfactoryexchange.com/CFXDemo/sdk/html/T_CFX_Structures_ResourceState.htm]
So in the example above:
OldState was "Standby. No Product (Resource is Starved)"
New State is "Productive Time. Regular Work"
It is not a case of state On or Off, but what condition the system of stage is currently in and what was it's previous state.
I hope this helps.
Simon
from cfx.
Thanks for the response!
I do understand that ResourceState is an enumeration of values corresponding to system condition descriptions, but what I was stuck on is that within the list of enumerated values you have things like SBY_NoProduct = 2200 and PRD_RegularWork = 1100, but there is no value defined for On or Off... yet the On and Off appear in the example code shown on the Getting Started with the SDK page.
private void btnSend_Click(object sender, EventArgs e)
{
CFXEnvelope msg = new CFXEnvelope(new StationStateChanged()
{
NewState = ResourceState.On,
OldState = ResourceState.Off,
OldStateDuration = TimeSpan.FromMinutes(43)
});
theEndpoint.Publish(env);
}
I was trying to determine if it is considered acceptable practice to have ResourceState values that are not explicitly listed on the original enumeration definition.
from cfx.
Related Issues (20)
- How to solve the problem of duplicate message when using amqpendpoint to send message?
- How to solve the problem of repeated message in the combination of amqpendpoint class and rabbitmq
- Request/Response using RabbitMQ HOT 2
- CFX.Production.UnitsArrived issue? HOT 1
- Direct Request/Response Pattern
- ResourceState for Blocked/Starved states have wrong values
- Is there a place for CFX messages to store extended data? HOT 1
- Closing an endpoint inside a callback call HOT 4
- .Net Core 2.1 is outdated and is a security issue HOT 1
- How do I send and receive user-defined information? HOT 2
- CloseSubscribeChannel
- Connecting to an Azure Service Bus Certificate null Error HOT 2
- ❗Connexion not closed if the Close() function is called when RabbitMQ is OFF
- Inconsistent Casing of MessageBody fields (eg TransactionID)
- Send message to RabbitMQ, RabbitMQ can receive message, but the payload in the message shows error code
- LaserMarkingProcessData Documentation Incorrect
- Retrieve garbage data from the OnMalformedMessageReceived event if the malformed message has been compressed using gzip.
- CFX for Beckhoff PLC HOT 1
- TestChannel() Fails when trying the test a secure connection.
- OnRequestReceived does not work on Linux
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 cfx.