throttlenet.lc 1.76 KB
Newer Older
Sven Robertz's avatar
Sven Robertz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
typedef short number_t; // placeholder for protocol buffers like encoding
typedef byte[6] eth_addr;

// *** Service registration,  lookup, and channel allocation

typedef struct { 
	string creatorId;
	string svcId;
	int version;
} serviceID; // Should probably be a PalCom-like struct

typedef struct {
	string key;
	byte value[-];
} property_t; // used for type info, grounding, etc.

typedef struct {
	string name;
	property_t properties[-];
	param_t params[-];
} command_t;

typedef struct {
	string name;
	property_t properties[-];
} param_t;

typedef struct {
	servicID svcID;
	string   name;
        command_t commands[-];
	byte data_description[-];
} serviceDescription; // d:o PalCom

typedef struct {
	eth_addr device; // or more generic, as in PalCom?
	serviceID svcID;
	number_t  instanceID;
	string instance_name;
} service_instance;

sample struct {
	service_instance svc;
	number_t chnID;   // the channel to use for connecting to the service
} service_register;

sample boolean ack;

sample struct {
} services_query;

sample struct {
	service_instance svcs[-]
} services_list;

sample struct {
	service_instance svc;
	number_t bytes_per_period;
	float periodtime; // in seconds  // or number_t microseconds?
	// importance?
} service_allocate_channel; // client -> GlobeThrottle to request connection

sample struct {
	// requesting service instance?
	number_t chnId; // the channel to send the connect message on
} service_channel_ACK;

sample struct {
	float max_utilization;
	// min period?
} service_channel_NACK;


// *** service to service connection negotiation

typedef struct {
	number_t sender_chnId; // The chnID at the sender's side that will receive the response, and subsequent traffic;
} connect_t;


sample connect_t connect_request;
sample connect_t connect_response;