FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kPxPort.h
Go to the documentation of this file.
1 
8 #ifndef K_FIRESYNC_PX_PORT_H
9 #define K_FIRESYNC_PX_PORT_H
10 
11 #include <kFireSync/kNodeDef.h>
12 #include <kApi/Data/kQueue.h>
13 #include <kFireSync/Pipe/kPxPort.x.h>
14 
21 //typedef kObject kPxPort; --forward-declared in kFsDef.x.h
22 
33 {
34  kObj(kPxPort, port);
35 
36  return obj->id;
37 }
38 
49 {
50  kObj(kPxPort, port);
51 
52  return obj->name;
53 }
54 
65 {
66  kObj(kPxPort, port);
67 
68  return obj->direction;
69 }
70 
89 {
90  kObj(kPxPort, port);
91 
92  obj->canAcceptForeignData = enable;
93 
94  return kOK;
95 }
96 
107 {
108  kObj(kPxPort, port);
109 
110  return obj->canAcceptForeignData;
111 }
112 
135 {
136  kObj(kPxPort, port);
137 
138  obj->asynchronousDataEnabled = enable;
139 
140  return kOK;
141 }
152 {
153  kObj(kPxPort, port);
154 
155  return obj->asynchronousDataEnabled;
156 }
157 
175 {
176  kObj(kPxPort, port);
177 
178  obj->dropEnabled = enable;
179 
180  return kOK;
181 }
182 
193 {
194  kObj(kPxPort, port);
195 
196  return obj->dropEnabled;
197 }
198 
209 {
210  kObj(kPxPort, port);
211 
212  return obj->block;
213 }
214 
227 {
228  kObj(kPxPort, port);
229 
230  return (kArrayList_Count(obj->connections) > 0);
231 }
232 
243 {
244  kObj(kPxPort, port);
245 
246  return kQueue_Count(obj->messages);
247 }
248 
259 kFsFx(kMsgSet) kPxPort_MessageAt(kPxPort port, kSize index);
260 
271 kFsFx(kMsgSource) kPxPort_MessageSourceAt(kPxPort port, kSize index);
272 
284 kFsFx(kStatus) kPxPort_RemoveMessage(kPxPort port, kMsgSet* message, kMsgSource* source);
285 
286 #endif
Represents a kPxBlock port.
kMsgSource kPxPort_MessageSourceAt(kPxPort port, kSize index)
Accesses source information for a message enqueued on this input port.
Represents information about the source of a pipe message.
Definition: kNodeDef.h:2508
kBool kPxPort_AsynchronousDataEnabled(kPxPort port)
Reports whether an output port is configured to emit messages asynchronously.
Definition: kPxPort.h:151
kSize kPxPort_MessageCount(kPxPort port)
Count of enqueued input messages available on this input port.
Definition: kPxPort.h:242
const kChar * kPxPort_Name(kPxPort port)
Gets a descriptive name for the port.
Definition: kPxPort.h:48
#define kInlineFx(TYPE)
kBool kPxPort_IsRouted(kPxPort port)
For an output port, reports whether the port is connected to any input ports.
Definition: kPxPort.h:226
k32u kPxPort_Id(kPxPort port)
Gets the unique numerical identifier for this port.
Definition: kPxPort.h:32
Essential declarations related to FireSync nodes.
Abstract base class for pipe block implementations.
kBool kPxPort_CanAcceptForeignData(kPxPort port)
Reports whether foreign data can be accepted by an input port.
Definition: kPxPort.h:106
kMsgSet kPxPort_MessageAt(kPxPort port, kSize index)
Accesses a message enqueued on this input port.
kPxBlock kPxPort_Block(kPxPort port)
Gets the block to which the port belongs.
Definition: kPxPort.h:208
kStatus kPxPort_AcceptForeignData(kPxPort port, kBool enable)
Enables an input port to accept foreign data.
Definition: kPxPort.h:88
#define kObj(TypeName_T, T_object)
kBool kPxPort_DropEnabled(kPxPort port)
Reports whether an output port is allowed to drop messages.
Definition: kPxPort.h:192
Represents the directionality of a block port.
kPortDirection kPxPort_Direction(kPxPort port)
Gets the directionality of the port (input vs.
Definition: kPxPort.h:64
kStatus kPxPort_RemoveMessage(kPxPort port, kMsgSet *message, kMsgSource *source)
Dequeues the next input message received on this input port.
Abstract base class for FireSync data messages.
kStatus kPxPort_EnableAsynchronousData(kPxPort port, kBool enable)
Enables an output port to emit messages asynchronously.
Definition: kPxPort.h:134
#define kOK
kStatus kPxPort_EnableDrop(kPxPort port, kBool enable)
Enables an output port to drop messages.
Definition: kPxPort.h:174