|
ceptr
|
protocol helpers header file More...
#include "receptor.h"Go to the source code of this file.
Functions | |
| void * | _o_add_label (char *label, T *def) |
| T * | _o_make_protocol_def (SemTable *sem, Context c, char *label,...) |
| T * | _o_bindings2sem_map (T *bindings, T *sem_map, T *defaults) |
| T * | _o_unwrap (SemTable *sem, T *def, T *sem_map) |
| T * | _o_resolve (SemTable *sem, T *def, T *bindings) |
| void | _o_express_role (Receptor *r, Symbol protocol, Symbol role, Aspect aspect, T *action) |
| T * | __o_initiate (Receptor *r, SemanticID protocol, SemanticID interaction, T *bindings, T **sem_mapP) |
| void | _o_initiate (Receptor *r, SemanticID protocol, SemanticID interaction, T *bindings) |
protocol helpers header file
Definition in file protocol.h.
| T* __o_initiate | ( | Receptor * | r, |
| SemanticID | protocol, | ||
| SemanticID | interaction, | ||
| T * | bindings, | ||
| T ** | sem_mapP | ||
| ) |
build a run-tree and semantic map that will initiate a protocol interaction
| [in] | receptor | initiating the protocol interaction |
| [in] | protocol | which protocol |
| [in] | interaction | which interaction in the protocol |
| [in] | bindings | tree of PROTOCOL_BINDINGS |
| [out] | sem_map | semantic map built by the protocol |
Definition at line 473 of file protocol.c.
convert PROTOCOL_BINDINGS to SEMANTIC_MAP adding in any defaults
| [in] | bindings | PROTOCOL_BINDINGS to be converted |
| [in,out] | sem_map | SEMANTIC_MAP to be added to (may be NULL) |
| [in] | defaults | PROTOCOL_DEFAULTS to be added if not in bindings |
Definition at line 234 of file protocol.c.
setup a receptor to participate as some role in a protocol
| [in] | receptor | in which to express the protocol role |
| [in] | protocol | which protocol |
| [in] | role | symbol of role to express |
| [in] | aspect | on which aspect to install the expectations |
| [in] | bindings | PROTOCOL_BINDINGs tree to concretize the unknowns in the protocol def |
Definition at line 409 of file protocol.c.
| void _o_initiate | ( | Receptor * | r, |
| SemanticID | protocol, | ||
| SemanticID | interaction, | ||
| T * | bindings | ||
| ) |
initiate the first signal in a protocol interaction
| [in] | receptor | initiating the protocol interaction |
| [in] | protocol | which protocol |
| [in] | interaction | which interaction in the protocol |
| [in] | bindings | tree of PROTOCOL_BINDINGS |
Definition at line 506 of file protocol.c.
helper to build a PROTOCOL_DEFINITION
NOTE: this just makes it easier to build protocol defs in c. If you don't get the params right when calling it, it will segfault!
| [in,out] | protocols | a protocols def tree containing protocols which will be added to |
| [in] | label | the name of the protocol |
| [in] | ... | params in correct order |
Definition at line 37 of file protocol.c.
convert a, possibly composed, protocol definition into an expressable definition
convert a PROTOCOL_DEF to a concretized version according to the RESOLUTIONs and LINKAGEs in the the def and the bindings
| [in] | sem | SemTable contexts |
| [in,out] | def | protocol definition to resolve |
| [in] | role | the role that needs resolving |
| [in] | sem_map | used to resolve the bindings |
Definition at line 372 of file protocol.c.
recursively expand wrapped protocol defs
| [in] | sem | SemTable of contexts |
| [in] | def | protocol definition tree |
| [in,out] | sem_map | semantic map of the unwrapped protocols |
Definition at line 262 of file protocol.c.