10:48, EEST
April 12, 2016
The “ProgramStateMachineType” which is the subtype of finite stateMachieType have the following 29 reffernces.
0 – ProgramDiagnostics: ProgramDiagnosticType (ReferenceType=HasComponent, BrowseName=ProgramDiagnostics)
1 – Ready: StateType (ReferenceType=HasComponent, BrowseName=Ready)
2 – Running: StateType (ReferenceType=HasComponent, BrowseName=Running)
3 – Suspended: StateType (ReferenceType=HasComponent, BrowseName=Suspended)
4 – Halted: StateType (ReferenceType=HasComponent, BrowseName=Halted)
5 – HaltedToReady: TransitionType (ReferenceType=HasComponent, BrowseName=HaltedToReady)
6 – ReadyToRunning: TransitionType (ReferenceType=HasComponent, BrowseName=ReadyToRunning)
7 – RunningToHalted: TransitionType (ReferenceType=HasComponent, BrowseName=RunningToHalted)
8 – RunningToReady: TransitionType (ReferenceType=HasComponent, BrowseName=RunningToReady)
9 – RunningToSuspended: TransitionType (ReferenceType=HasComponent, BrowseName=RunningToSuspended)
10 – SuspendedToRunning: TransitionType (ReferenceType=HasComponent, BrowseName=SuspendedToRunning)
11 – SuspendedToHalted: TransitionType (ReferenceType=HasComponent, BrowseName=SuspendedToHalted)
12 – SuspendedToReady: TransitionType (ReferenceType=HasComponent, BrowseName=SuspendedToReady)
13 – ReadyToHalted: TransitionType (ReferenceType=HasComponent, BrowseName=ReadyToHalted)
14 – Start: [Method] (ReferenceType=HasComponent, BrowseName=Start)
15 – Suspend: [Method] (ReferenceType=HasComponent, BrowseName=Suspend)
16 – Resume: [Method] (ReferenceType=HasComponent, BrowseName=Resume)
17 – Halt: [Method] (ReferenceType=HasComponent, BrowseName=Halt)
18 – Reset: [Method] (ReferenceType=HasComponent, BrowseName=Reset)
19 – CurrentState: FiniteStateVariableType (ReferenceType=HasComponent, BrowseName=CurrentState)
20 – LastTransition: FiniteTransitionVariableType (ReferenceType=HasComponent, BrowseName=LastTransition)
21 – FinalResultData: BaseObjectType (ReferenceType=HasComponent, BrowseName=FinalResultData)
22 – Deletable: PropertyType (ReferenceType=HasProperty, BrowseName=Deletable)
23 – InstanceCount: PropertyType (ReferenceType=HasProperty, BrowseName=InstanceCount)
24 – Creatable: PropertyType (ReferenceType=HasProperty, BrowseName=Creatable)
25 – MaxRecycleCount: PropertyType (ReferenceType=HasProperty, BrowseName=MaxRecycleCount)
26 – MaxInstanceCount: PropertyType (ReferenceType=HasProperty, BrowseName=MaxInstanceCount)
27 – RecycleCount: PropertyType (ReferenceType=HasProperty, BrowseName=RecycleCount)
28 – AutoDelete: PropertyType (ReferenceType=HasProperty, BrowseName=AutoDelete)
when i create a node of object type and select its type defination as “ProgramStateMachineType” then it should be populated with all these references.. but when i create
a node with this type definition it is empty 🙁 . my code is below
NodeId typeDefinition=Identifiers.ProgramStateMachineType;
NodeClass nodeClass=NodeClass.Object;
ObjectAttributes objectAttributes=new ObjectAttributes();
objectAttributes.setDescription(LocalizedText.english(“I am a Object Node”));
objectAttributes.setSpecifiedAttributes(NodeAttributesMask.getMask(
NodeAttributesMask.Description,
NodeAttributesMask.DisplayName,
NodeAttributesMask.UserWriteMask,
NodeAttributesMask.WriteMask));
objectAttributes.setUserWriteMask(UnsignedInteger.ONE);
objectAttributes.setWriteMask(UnsignedInteger.ONE);
NodeAttributes nodeAttributes= objectAttributes;
String NameSpaceIndex=2;
String name=”MyMachine”;
NodeId newNodeId = new NodeId(NameSpaceIndex,name);
QualifiedName browseName=new QualifiedName(NameSpaceIndex,name);
nodeAttributes.setDisplayName(new LocalizedText(name));
NodeId referenceTypeId =Identifiers.HasComponent;
NodeId parentNode= MyObjects ; // Root -> Objects -> MyObjects
NodeId Id = client.getAddressSpace().addNode(
parentNode,
referenceTypeId,
newNodeId,
browseName,
nodeClass,
nodeAttributes,
typeDefinition);
my new node is successfully created and typedefinition is assigned but my object does not have any references which are defined in “ProgramStateMachineType”.
Logically when we create a node and add its typeDefinition reference all the mandatory references and attirbutes must also be instantiated inside my node. the same structure of typedefinition should be reflected in the instance node, BUT its not happening.
what should I do ?
11:17, EEST
April 3, 2012
Hi,
That scenario is not well defined in the specification (at least not in AddNodes Service description, based on my interpretation). This is server specific anyway because in most cases there is some logic that must be attached to the node for it to be of any use.
Assuming you are trying to do this for a server made with our SDK and can change the code (and you are using NodeManagerUaNode):
Override NodeManagerUaNode.createNodeForAddNode to use one of it’s createInstance methods, then you should get the full structure (depending on the UaNodeBuilderConfiguration, by default it creates mandatory nodes). And as addition note the NodeManagerTable.setNodeManagementEnabled(true) must be set for AddNodes to work at all (it is by default off).
– Bjarne
Most Users Ever Online: 1919
Currently Online:
25 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachusModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1