ceptr
 All Data Structures Files Functions Variables Typedefs Macros Modules Pages
receptor.c File Reference

receptor implementation More...

#include "receptor.h"
#include "stream.h"
#include "semtrex.h"
#include "process.h"
#include "accumulator.h"
#include "debug.h"
#include "mtree.h"
#include "protocol.h"
#include <stdarg.h>
#include <time.h>
#include <unistd.h>
Include dependency graph for receptor.c:

Go to the source code of this file.

typedef void(* doConversationFn )(T *, void *)
 
Xaddr G_null_xaddr = {0,0}
 
char __t_dump_buf [10000]
 
Receptor__r_init (T *t, SemTable *sem)
 
T__r_add_aspect (T *flux, Aspect aspect)
 
T_r_make_state ()
 
T__r_make_definitions ()
 
Receptor_r_new (SemTable *sem, SemanticID r)
 Creates a new receptor. More...
 
Receptor_r_new_receptor_from_package (SemTable *sem, Symbol s, T *p, T *bindings)
 Creates a new receptor from a receptor package. More...
 
T__r_build_default_until ()
 
T__r_build_expectation (Symbol carrier, T *pattern, T *action, T *with, T *until, T *using, T *cid)
 
void _r_add_expectation (Receptor *r, Aspect aspect, Symbol carrier, T *pattern, T *action, T *with, T *until, T *using, T *cid)
 Adds an expectation to a receptor's aspect. More...
 
void __r_add_expectation (Receptor *r, Aspect aspect, T *e)
 
void _r_remove_expectation (Receptor *r, T *expectation)
 
void _r_free (Receptor *r)
 
Symbol _r_define_symbol (Receptor *r, Structure s, char *label)
 
Structure _r_define_structure (Receptor *r, char *label, int num_params,...)
 
Structure __r_define_structure (Receptor *r, char *label, T *structure_def)
 
Process _r_define_process (Receptor *r, T *code, char *name, char *intention, T *signature, T *link)
 
Protocol _r_define_protocol (Receptor *r, T *protocol_def)
 
Symbol _r_get_sem_by_label (Receptor *r, char *label)
 
Structure __r_get_symbol_structure (Receptor *r, Symbol s)
 find a symbol's structure More...
 
size_t __r_get_structure_size (Receptor *r, Structure s, void *surface)
 
size_t __r_get_symbol_size (Receptor *r, Symbol s, void *surface)
 
T_r_build_def_semtrex (Receptor *r, Symbol s)
 
int _r_def_match (Receptor *r, Symbol s, T *t)
 
Xaddr _r_new_instance (Receptor *r, T *t)
 
T_r_get_instance (Receptor *r, Xaddr x)
 
T_r_set_instance (Receptor *r, Xaddr x, T *t)
 
T_r_delete_instance (Receptor *r, Xaddr x)
 
TreeHash _r_hash (Receptor *r, Xaddr t)
 
void _r_serialize (Receptor *r, void **surfaceP, size_t *lengthP)
 
Receptor_r_unserialize (SemTable *sem, void *surface)
 
T___r_make_addr (T *parent, Symbol type, ReceptorAddress addr, bool is_run_node)
 
ReceptorAddress __r_get_addr (T *addr)
 
T__r_make_signal (ReceptorAddress from, ReceptorAddress to, Aspect aspect, Symbol carrier, T *signal_contents, UUIDt *in_response_to, T *until, T *cid)
 
T__r_send (Receptor *r, T *signal)
 
T_r_send (Receptor *r, T *signal)
 
T_r_request (Receptor *r, T *signal, Symbol response_carrier, T *code_point, int process_id, T *cid)
 
void evaluateEndCondition (T *ec, bool *cleanup, bool *allow)
 
void __r_test_expectation (Receptor *r, T *expectation, T *signal)
 
T__r_sanatize_response (Receptor *r, T *response)
 
int __r_deliver_response (Receptor *r, T *response_to, T *signal)
 
bool __cid_equal (SemTable *sem, T *cid1, T *cid2)
 
T__cid_new (T *parent, UUIDt *c, T *topic)
 
UUIDt__cid_getUUID (T *cid)
 
T_r_add_conversation (Receptor *r, UUIDt *parent_u, UUIDt *u, T *until, T *wakeup)
 
T__r_find_conversation (T *conversations, UUIDt *uuid)
 
T_r_find_conversation (Receptor *r, UUIDt *uuid)
 
void __r_walk_conversation (T *conversation, doConversationFn fn, void *param)
 
void _cleaner (T *cid, void *p)
 
T__r_cleanup_conversation (Receptor *r, UUIDt *cuuid)
 
Error _r_deliver (Receptor *r, T *signal)
 
T__r_get_aspect (Receptor *r, Aspect aspect)
 
T__r_get_expectations (Receptor *r, Aspect aspect)
 
T__r_get_signals (Receptor *r, Aspect aspect)
 
Receptor__r_get_receptor (T *installed_receptor)
 
char * _r_get_symbol_name (Receptor *r, Symbol s)
 
char * _r_get_structure_name (Receptor *r, Structure s)
 
char * _r_get_process_name (Receptor *r, Process p)
 
char * _td (Receptor *r, T *t)
 
char * __td (Receptor *r, T *t, char *buf)
 
Receptor_r_makeStreamEdgeReceptor (SemTable *sem)
 
void __r_listenerCallback (Stream *st, void *arg)
 
SocketListener_r_addListener (Receptor *r, int port, T *code, T *params, T *err_handler, char *delim)
 
void _r_addReader (Receptor *r, Stream *st, ReceptorAddress to, Aspect aspect, Symbol carrier, Symbol result_symbol, bool conversation)
 
void _r_addWriter (Receptor *r, Stream *st, Aspect aspect)
 
void _r_defineClockReceptor (SemTable *sem)
 
Receptor_r_makeClockReceptor (SemTable *sem)
 
void * ___clock_thread (void *arg)
 
T__r_make_timestamp (Symbol s, int delta)
 
void __r_kill (Receptor *r)
 
ReceptorAddress __r_get_self_address (Receptor *r)
 
void __r_dump_instances (Receptor *r)
 

Detailed Description

receptor implementation

Definition in file receptor.c.

Function Documentation

size_t __r_get_structure_size ( Receptor r,
Structure  s,
void *  surface 
)

get the size of a structure's surface

Returns
size

Definition at line 307 of file receptor.c.