Presentation is loading. Please wait.

Presentation is loading. Please wait.

EPICS V4 Protocol Proposal Jeff Hill. Summary Background Motivation Requirements Some Choices Data Types Protocol Next steps.

Similar presentations


Presentation on theme: "EPICS V4 Protocol Proposal Jeff Hill. Summary Background Motivation Requirements Some Choices Data Types Protocol Next steps."— Presentation transcript:

1 EPICS V4 Protocol Proposal Jeff Hill

2 Summary Background Motivation Requirements Some Choices Data Types Protocol Next steps

3 Background An HTML document describing the proposed protocol has existed for some time On the EPICS wiki, but wasn't widely viewed With this talk I am hoping for a wider audience, and some additional opportunity to receive feedback

4 Motivation – Runtime Defined Types Implement put, get, and subscribe for runtime defined types (RDTs) 1.Programming language – design time defined - data structures  Fixed during Client side tool’s design and development 2.Configuration - run time defined - data types  Types defined by an ASCII protocol and or GUIs  Instances loaded via ASCII protocol and or GUIs

5 Motivation – Runtime Defined Types Loose coupling between runtime defined types of client side tools and services ◦Service type can be superset of the clients type  Requires runtime introspection of types ◦The flexibility to develop project, site, and discipline specific extensions  Interoperating with general purpose components  w/o delays waiting for a new release of core software Loose coupling doesn’t mean un-typed

6 ServerServer Motivation – Recursive Services Request RDT Response RDT Request RDT Response RDT Response RDT Request RDT Server Record Device Support

7 Motivation – Recursive Services, Examples Put Request ◦Gateway { value { time-stamp}, request-modifiers { db { process-passive }, synch-event-id } } ◦Server { value { time-stamp}, request-modifiers { db { process-passive }, synch-event-id } } ◦Record { value { time-stamp}, request-modifiers < db { process-passive }, synch-event-id } } ◦Device Support { value { time-stamp}, request-modifiers { synch-event-id } }

8 Motivation – Recursive Services, Examples Subscribe Request ◦Gateway subscribe request { request-modifiers { event-spec, max-rate, dead-band, filter- expression } } ◦Server subscribe request { request-modifiers { event-spec, max-rate, dead-band, filter- expression } } ◦Record subscribe request { request-modifiers { event-spec, max-rate, dead-band, filter- expression } } ◦Device Support subscribe Request { request-modifiers { event-spec, max-rate, dead-band, filter- expression } } Each layer has multiple clients, single entity below ◦Generalize N subscription request modifiers in scope  To a less specific superset subscription request modifier ◦Install new, timely removal of preexisting, subscription

9 Motivation – Recursive Services, Examples Subscribe Response ◦Device support subscription update { value { time-stamp, LANSCE { beam-gate-state } > ◦Record support subscription update { value { time-stamp, alarm-status, LANSCE { beam-gate-state } > Need both situations ◦Generic clients work despite presence of LANSCE beam-gate-state ◦LANSCE specific clients benefit from presence of beam-gate-state

10 Requirements – Backward Compatibility All functionality available with legacy protocol available in new protocol Both legacy and new protocol engines co- resident during, indefinite length, transition period ◦At large sites a staged transition must be possible ◦At some sites it might be optimistic to assume that a transition will ever occur

11 Requirements – Runtime Defined Types RDTs – a set of properties on the wire ◦Their names ◦Their transport order (can be hierarchical) ◦Their transport primitive types Topology learned from snap-ins at runtime ◦From the client side tool ◦From service snap-in

12 Requirements - Efficiency Asynchronous request response behavior ◦i.e. multiple simultaneous requests Binary (not string) transport of binary values Description of User defined types ◦Can be communicated just once, and does not accompany every instance of the data

13 Requirements - Obvious Two’s complement signed integers IEEE floating point Support for types used by 64 bit CPUs ◦Will need disciplined conversion when larger types are converted to smaller ones  Data Access library takes care of this ◦And, or software emulation on 32bit systems

14 Some Choices Data elements are not naturally aligned ◦Allows for more compact protocol ◦Natural alignment doesn’t help that much  When host, network octet order don’t match  When TCP hands off data on any octet boundary ◦ Can cause double copying to occur Network byte order for multi-octet primitive types ◦Somewhat arbitrary choice – we currently use big-endian

15 Some Choices Implemented as Services ◦Channel name resolution ◦Authentication ◦Server diagnostics Benefits ◦Well defined boundaries allow  Multiple implementations and authors  Site, project, culturally specific implementations

16 Data Types – Public Externally Visible Data Types MnemonicWire EncodingIdentifier reserved0 INT88 bit signed integer1 INT1616 bit signed integer2 INT3232 bit signed integer3 INT6464 bit signed integer4 FLOAT3232 bit IEEE floating point5 FLOAT6464 bit IEEE floating point6 FLOAT128128 bit IEEE floating point7 STRINGUTF-8 encoded character string8 ContainerSee PTSD below9 reserved9 - 256

17 Data Types – Protocol Private Protocol Private Data Types MnemonicData Type UINT88 bit unsigned integer UNIT1616 bit unsigned integer UINT3232 bit unsigned integer UINT6464 bit unsigned integer UINTNvariable length unsigned integer PTSDproperty transport sequence definition PTSproperty transport sequence (variable, conforming to PTSD) DSDdimension sequence description DBDdimension bounds definition ADBarray dimension bound

18 Data Types – UINTN, 1 or 2 Octets UINTN - 1 Octet Data TypeBit 7, msbBits 7 - 0 OCTET0 Bits 0-7 of unsigned integer value UINTN - 2 Octets Data TypeBit 7, msbBits 7 - 0 OCTET1 Bits 0-7 of unsigned integer value OCTET0 Bits 8-15 of unsigned integer value

19 Data Types – UINTN, N Octets Data TypemsbBits 7 - 0 OCTET1 Bits 0-7 of unsigned integer value OCTET1 Bits 8-15 of unsigned integer value OCTET1 Bits 16-23 of unsigned integer value...1 OCTET N0 Bits N*8-N*9-1 of unsigned integer value

20 Data Types – String, UTF-8 STRING Data TypePurpose UINTNthe number of UTF-8 tokens OCTET sequenceUTF-8 encoded character string sequence (no nil termination)

21 Data Types – Dimension Sequence Definition, Dimension Bound Definition Scalar Dimension Sequence Data TypePurposeValue UINTNSpecifies that the data is scalar0 Array Dimension Sequence Data TypePurposeValue UINTN Specifies the number of property bounds definitions for array data N, not zero N X DBDsequence of N property bounds definitionsSender defined Dimension Bound Definition, Fixed Bound Data TypePurposeValue UINTNBound Type0, fixed bound ADBArray dimension boundSender defined Dimension Bound Definition, Variable Bound Data TypePurposeValue UINTNBound Type1, variable bound Array Dimension Bound Data TypePurposeValue UINTNFirst element indexSender defined UINTNElement countSender defined

22 Data Types – Property Transport Sequence Definition Property Transport Sequence Definition Data TypePurpose UINTNNumber of properties in sequence N Property transport definitionsSee below Property Transport Definition - Atomic Data TypePurposeValue UINTNProperty IdSender defined UINTNData Type IdentifierSender defined, not 9 DSDDimension sequence descriptionSender defined Property Transport Definition - Container Data TypePurposeValue UINTNProperty IdSender defined UINTNData Type Identifier9 DSDDimension sequence descriptionSender defined PSDProperty transport sequence definitionSender defined

23 Property Transport Sequence Packed binary Not naturally aligned As specified, PTSD

24 Protocol – Summary Initiate Define, expunge channel Swap channel Ids Define, Expunge Property Id Swap Property Ids Define, Expunge Property Transport Sequence Swap property transport sequence definition id IO Requests ◦Write, unacknowledged ◦Write, acknowledged ◦Read ◦Subscribe ◦Invoke  Command / response ◦Cancel Server verify

25 Protocol – Initiate Data Type PurposeValue UINT16Reserved for future use0 UINT16Reserved for future use0 UINT16 protocol minor revision number 15 UINT32magic number0x5b43415d == '[' 'C' 'A' ']' UNIT32 A sequence number incrementing with each successive message for data-grams. Clients use this sequence number to detect duplicates and out of order delivery. Reserved for future use with virtual circuits. zero when it’s a virtual circuit, and otherwise the sequence number

26 Protocol – Define, Expunge Channel Define Channel Request Data TypePurposeValue UINTNDirective1 UINTNChannel IdentifierSender defined UINTNProperty Transport Sequence Definition Identifier PTSChannel Name, priority, …Sender defined Expunge Channel Request Data TypePurposeValue UINTNDirective 2 UINTNChannel IdentifierSender defined

27 Protocol – Swap Channel Identifiers Swap Channel Identifiers Request Data TypePurposeValue UINTNDirective 3 UINTNRequest identifierSender defined UINTNChannel Identifier oneSender defined UINTNChannel Identifier twoSender defined Swap Channel Identifiers Successful Response Data TypePurposeValue UINTNRequest identifierClient defined

28 Protocol – Define Property Define Property Request Data TypePurposeValue UINTNDirective4 UINTNProperty identifierSender defined STRINGProperty nameSender defined Expunge Property Request Data TypePurposeValue UINTNDirective 5 UINTNProperty IdentifierSender defined Channel name, optionally includes property hierarchy path

29 Protocol – Swap Property Identifiers Swap Property Identifiers Request Data TypePurposeValue UINTNDirective 6 UINTNRequest identifierSender defined UINTNProperty Identifier oneSender defined UINTNProperty Identifier twoSender defined Swap Property Identifiers Successful Response Data TypePurposeValue UINTNRequest identifierClient defined

30 Protocol – Define, Expunge Property Transport Sequence Define Property Transport Sequence Request Data TypePurposeValue UINTNDirective7 UINTNProperty sequence identifierSender defined PTSDProperty transport sequence definitionSender defined Expunge Property Transport Sequence Request Data TypePurposeValue UINTNDirective 8 UINTNProperty transport sequence definition identifierSender defined

31 Protocol - Swap Property Transport Sequence Identifiers Request Swap Property Transport Sequence Identifiers Request Data TypePurposeValue UINTNDirective 9 UINTNRequest identifierSender defined UINTNProperty Transport Sequence Identifier oneSender defined UINTNProperty Transport Sequence Identifier twoSender defined Swap Property Transport Sequence Identifiers Successful Response Data TypePurposeValue UINTNRequest identifierClient defined

32 Protocol – Write, Unacknowledged Channel Write Request – Unacknowledged Data TypePurposeValue UINTNDirective10 UNINTChannel identifierSender defined UINTNProperty transport sequence definition identifier, payloadSender defined PTSProperty payload to be writtenSender defined

33 Protocol – Write, Acknowledged Channel Write Request – With Acknowledge Data TypePurposeValue UINTNDirective11 UINTNRequest identifierSender defined UNINTChannel identifierSender defined UINTNProperty transport sequence definition identifier, payloadSender defined PTSProperty payload to be written, including request modifiersSender defined Channel Write Successful Response Data TypePurposeValue UINTNRequest identifierClient defined

34 Protocol - Channel Read or Subscribe Channel Read or Subscribe Request Data TypePurposeValue UINTNDirective12 (rd), 13 (sub) UINTNRequest identifierSender defined UINTNChannel identifierSender defined UINTNProperty transport sequence definition identifier, request payloadSender defined UINTNProperty transport sequence definition identifier, response payloadSender defined PTSRequest modifiers payloadSender defined Channel Read or Subscribe Successful Response Data TypePurposeValue UINTNRequest identifierClient defined PTSResponse property payload, readClient formatted, server defined

35 Protocol – Generic Invoke Channel Generic Invoke Request Data TypePurposeValue UINTNDirective14 UINTNRequest identifierSender defined UINTNChannel identifierSender defined UINTN Property transport sequence definition identifier, request payload Sender defined UINTN Property transport sequence definition identifier, response payload Sender defined PTSRequest property payloadSender defined Channel Generic Invoke Successful Response Data TypePurposeValue UINTNRequest identifierClient defined PTSResponse property payloadClient formatted, server defined

36 Protocol – Server Verify Server Verify Request Data TypePurposeValue UINTNDirective16 UINTNRequest identifierSender defined UINTN Property transport sequence definition identifier, response payload Sender defined Circuit Verify Successful Response Data TypePurposeValue OBJIDRequest identifierClient defined PTSServer status parametersClient formatted, server defined

37 Next Steps Perhaps we form a working group ◦Finalize list of our unique motivations, requirements ◦Design / review protocol definition Write protocol libraries – we have the expertise


Download ppt "EPICS V4 Protocol Proposal Jeff Hill. Summary Background Motivation Requirements Some Choices Data Types Protocol Next steps."

Similar presentations


Ads by Google