A
1: S
ap
V
2 •
1
2
4
© 2017 Telos Alliance - Rev 1.2
Init Examples
Most object may also be created and destroyed using the INIT and DEL operators. The arguments required to
create an object can be obtained by sending a get command to the object path of an existing object with the special
hidden property called Constructor. See Hidden Properties for details..
INIT MemorySlots#0.MemorySlot SlotName=”Hello” SlotValue=”Hello” Persistent=True
In this case, the final object in the path does not have an ID associated with it because the constructing parameters
will define the ID as part of the construction process. If we were subscribed to MemorySlot changes, we should see
the results of this creation returned as a NEW message.
Delete Examples
Objects may be deleted from the system using the DEL operator and an object path. Properties are not valid in a
Delete message.
DEL MemorySlots#0.MemorySlot#Hello
If the connection has subscribed to changes that match this deletion, there will be a response:
LED MemorySlots#0.MemorySlot#Hello
The LED operator is the response for a DEL operation but will only be returned if a subscription has been made that
matches the deletion object path.
Request for syntax
The RFS operator stands for Request For Syntax and the server will respond with SFR which stands for Syntax For
Request. The RFS operator allows you to discover what a specific property expects for its value.
rfs Devices#0.WinDriver#[tcp://172.16.1.254:93].LwrpInterpreter#0.LwrpRoot#0.Gpo#6.GpioPinState#2 Pinstate
sfr Devices#0.WinDriver#[tcp://172.16.1.254:93].LwrpInterpreter#0.LwrpRoot#0.Gpo#6.GpioPinState#2 Pinstate=
”[ReadWrite=RW,SyntaxType=OPT,IsStable=True,SyntaxUsage=\”Single:l(Low),h(High)\”,IsSimpleUi=True]”
We get a variety of information about the property from this command. We know that the property is read/write,
that it expects an option and the valid options are l or h. We know that it is a stable property which means that it’s
syntax should not be expected to change in future versions of PFCore unless carefully noted and/or with backwards
compatibility handling. We also know that the l or h may be displayed in a more user friendly fashion in a UI as
Low or High. And we know that this property is one that should be displayed in the simple tree of logic flows
(IsSimpleUi).
The list of syntax types that will be returned is documented in the RFS/SFR notes later in this document.