Transformer SDK For C
6.2.11.309924
|
Macros | |
#define | DS_AND(p1, p2, a) |
Combine two peersets using bitwise and. More... | |
#define | DS_AND3_ISZERO(p1, p2, p3) |
Test if the bitwise and of 3 peersets is 0. More... | |
#define | DS_AND_ISZERO(p1, p2) |
Test if the bitwise and of 2 peersets is 0. More... | |
#define | DS_CACHE_DATASRC |
Peer index of cache datasrc. More... | |
#define | DS_CLR(n, p) |
Clears peer n in peerset p. More... | |
#define | DS_INTERNAL_DATASRC |
Peer index of internal datasrc. More... | |
#define | DS_ISEQUAL(p1, p2) |
Test if 2 peersets are equal. More... | |
#define | DS_ISSET(n, p) |
Tests whether peer n in peerset p. More... | |
#define | DS_ISZERO(p) |
Checks if all peers in peerset p are cleared. More... | |
#define | DS_MAX_PEERS |
Maximum number of peers. More... | |
#define | DS_MIN_PEER |
Minimum index for configured peer. More... | |
#define | DS_NONZERO(p) |
Sets all peers in peerset p. More... | |
#define | DS_OR(p1, p2, o) |
Combine two peersets using bitwise or. More... | |
#define | DS_SET(n, p) |
Sets peer n in peerset p. More... | |
#define | DS_T_ACTIVE |
Defines the active source peer type, which can accept requests for objects. This flag could be set on the DataSource initialisation object ds_init_t or set in the add-peer sections of a configuration file. More... | |
#define | DS_T_CONTRIB |
Defines the contribution peer type. This source should automatically receive data updates for objects that it has updated itself. This flag could be set on the DataSource initialisation object ds_init_t or set in the add-peer sections of a configuration file. More... | |
#define | DS_ZERO(p) |
Unsets all peers in peerset p. More... | |
#define | F_NOCONNECT |
Suppresses the automatic connection to DataSource peers on startup. The connection can then be made later using ds_set_status_up(). More... | |
#define | F_RECVAUTOREPLAY |
Defines the Receive Auto Replay peer flag (indicating that, when restarting, this peer should accept replay updates). More... | |
#define | F_SENDFROMSEQ |
Defines the Send From Sequence peer flag (indicating that, when reconnecting, missed packets should be requested based on the last sequence number). More... | |
Typedefs | |
typedef struct _ds_peer_set | ds_set_t |
Defines a set of DataSource peers. More... | |
As well as being a source of data, DataSource can act as a destination for data sent from other DataSource applications, as illustrated in the diagram below:
A DataSource peer is another DataSource installed remotely, which your DataSource can receive data from and send to.
As this means the link between DataSources is bidirectional, the true relationship between DataSources is shown in Figure 6.2 below.
Objects can be requested from individual DataSource peers or groups of peers. This can be configured using the add-source-mapping
configuration option.
An active DataSource is one that will accept requests for objects. The opposite of this is a broadcast DataSource, which simply sends all objects and updates to its peers.
It is an active DataSource's responsibility to keep track of which objects have been requested and send updates for those objects only.
Objects may be discarded as well as requested. This tells the source that we no longer wish to receive updates for this object.
When a user requests an object, and Caplin Liberator does not already have it, it will request it from one or more of its active sources. If another user requests that object Caplin Liberator will already have all the information it needs, and will respond to the user immediately.
When a user logs out or discards an object, Caplin Liberator will send a discard message to the active DataSource (as long as no other user is viewing that object). This discard will actually take place one minute after the user discarded the object; this prevents objects being requested and discarded from the source unnecessarily.
For a DataSource to receive requests from a DataSource peer or Caplin Liberator, the type member of the initialisation object ds_init_t must be set to DS_T_ACTIVE.
#define DS_AND | ( | p1, | |
p2, | |||
a | |||
) |
Combine two peersets using bitwise and.
#define DS_AND3_ISZERO | ( | p1, | |
p2, | |||
p3 | |||
) |
Test if the bitwise and of 3 peersets is 0.
#define DS_AND_ISZERO | ( | p1, | |
p2 | |||
) |
Test if the bitwise and of 2 peersets is 0.
#define DS_CACHE_DATASRC |
Peer index of cache datasrc.
#define DS_CLR | ( | n, | |
p | |||
) |
Clears peer n in peerset p.
#define DS_INTERNAL_DATASRC |
Peer index of internal datasrc.
#define DS_ISEQUAL | ( | p1, | |
p2 | |||
) |
Test if 2 peersets are equal.
#define DS_ISSET | ( | n, | |
p | |||
) |
Tests whether peer n in peerset p.
#define DS_ISZERO | ( | p | ) |
Checks if all peers in peerset p are cleared.
#define DS_MAX_PEERS |
Maximum number of peers.
#define DS_MIN_PEER |
Minimum index for configured peer.
#define DS_NONZERO | ( | p | ) |
Sets all peers in peerset p.
#define DS_OR | ( | p1, | |
p2, | |||
o | |||
) |
Combine two peersets using bitwise or.
#define DS_SET | ( | n, | |
p | |||
) |
Sets peer n in peerset p.
#define DS_T_ACTIVE |
Defines the active source peer type, which can accept requests for objects. This flag could be set on the DataSource initialisation object ds_init_t or set in the add-peer
sections of a configuration file.
#define DS_T_CONTRIB |
Defines the contribution peer type. This source should automatically receive data updates for objects that it has updated itself. This flag could be set on the DataSource initialisation object ds_init_t or set in the add-peer
sections of a configuration file.
#define DS_ZERO | ( | p | ) |
Unsets all peers in peerset p.
#define F_NOCONNECT |
Suppresses the automatic connection to DataSource peers on startup. The connection can then be made later using ds_set_status_up().
This flag should be set on the DataSource initialisation object ds_init_t. It can also be set in the add-peer
sections of a configuration file rather than hardcoded for all peers, although hardcoding it is more likely as this is usually used when the application depends on making its own connections or other initialisation before DataSource connections are made.
#define F_RECVAUTOREPLAY |
Defines the Receive Auto Replay peer flag (indicating that, when restarting, this peer should accept replay updates).
The datasrc-auto-replay
option must be set in your configuration file for replay to occur. This flag could be set on the DataSource initialisation object ds_init_t, however it is more typically used in the add-peer
sections of a configuration file rather than hardcoded for all peers.
#define F_SENDFROMSEQ |
Defines the Send From Sequence peer flag (indicating that, when reconnecting, missed packets should be requested based on the last sequence number).
This flag could be set on the DataSource initialisation object ds_init_t or set in the add-peer
sections of a configuration file. It is set on the side that will receive the missed messages, as it instructs DataSource to send the last received sequence number to the peer, which will then flush any queued messages since that sequence number.
typedef struct _ds_peer_set ds_set_t |
Defines a set of DataSource peers.