Go to the documentation of this file.00001
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128 #ifndef RINGIO_H_0xd3f4
00129 #define RINGIO_H_0xd3f4
00130
00131
00132 #include <ti/syslink/SysLink.h>
00133
00134 #if defined (__cplusplus)
00135 extern "C" {
00136 #endif
00137
00138
00139
00140
00141
00142
00151 #define RingIO_S_PENDINGATTRIBUTE 4
00152
00158 #define RingIO_S_NOTCONTIGUOUSDATA 3
00159
00164 #define RingIO_S_BUSY 2
00165
00170 #define RingIO_S_ALREADYSETUP 1
00171
00176 #define RingIO_S_SUCCESS 0
00177
00182 #define RingIO_E_FAIL -1
00183
00188 #define RingIO_E_INVALIDARG -2
00189
00194 #define RingIO_E_MEMORY -3
00195
00200 #define RingIO_E_ALREADYEXISTS -4
00201
00206 #define RingIO_E_NOTFOUND -5
00207
00212 #define RingIO_E_TIMEOUT -6
00213
00218 #define RingIO_E_INVALIDSTATE -7
00219
00224 #define RingIO_E_OSFAILURE -8
00225
00230 #define RingIO_E_RESOURCE -9
00231
00236 #define RingIO_E_RESTART -10
00237
00242 #define RingIO_E_INVALIDMSG -11
00243
00248 #define RingIO_E_NOTOWNER -12
00249
00254 #define RingIO_E_REMOTEACTIVE -13
00255
00260 #define RingIO_E_INVALIDHEAPID -14
00261
00266 #define RingIO_E_INVALIDPROCID -15
00267
00272 #define RingIO_E_MAXREACHED -16
00273
00278 #define RingIO_E_INUSE -17
00279
00284 #define RingIO_E_INVALIDCONTEXT -18
00285
00290 #define RingIO_E_BADVERSION -19
00291
00297 #define RingIO_E_BUFWRAP -20
00298
00303 #define RingIO_E_BUFEMPTY -21
00304
00309 #define RingIO_E_BUFFULL -22
00310
00316 #define RingIO_E_PENDINGDATA -23
00317
00323 #define RingIO_E_VARIABLEATTRIBUTE -24
00324
00325
00330 #define RingIO_E_WRONGSTATE -25
00331
00335 #define RingIO_E_NOTIFYFAIL -26
00336
00342 #define RingIO_E_PENDINGATTRIBUTE -27
00343
00344
00345
00346
00347
00348
00355 typedef Ptr RingIO_BufPtr;
00356
00364 typedef UInt16 RingIO_NotifyMsg;
00365
00366
00367
00368
00369
00373 typedef struct RingIO_Object * RingIO_Handle;
00374
00375
00376
00377
00378
00379 typedef enum RingIO_Type_Tag {
00380 RingIO_Type_SHAREDMEM = 0x0
00383 } RingIO_Type;
00384
00385
00386
00387
00388 #ifndef SYSLINK_BUILDOS_QNX
00389
00392 typedef struct RingIO_Config_Tag {
00393 UInt32 maxNameLen;
00395 UInt32 maxInstances;
00397 } RingIO_Config;
00398 #endif
00399
00405 typedef struct RingIO_Params_Tag {
00406 String name;
00408 RingIO_Type interfaceType;
00410 } RingIO_Params;
00411
00415 typedef enum RingIO_OpenMode_Tag {
00416 RingIO_MODE_READER = 0x0,
00418 RingIO_MODE_WRITER = 0x1
00420 } RingIO_OpenMode;
00421
00426 typedef struct RingIO_openParams_Tag {
00427 UInt32 flags;
00430 RingIO_OpenMode openMode;
00432 } RingIO_openParams;
00433
00434
00439 typedef struct RingIO_sharedMemReqDetails_tag {
00440 UInt32 ctrlSharedMemReq;
00442 UInt32 dataSharedMemReq;
00444 UInt32 attrSharedMemReq;
00446 } RingIO_sharedMemReqDetails;
00447
00448
00453 typedef enum RingIO_Flags_tag {
00454 RingIO_DATABUF_MAINTAINCACHE = 0x1,
00457 RingIO_NEED_EXACT_SIZE = 0x2
00463 } RingIO_Flags;
00464
00468 typedef enum RingIO_NotifyType_Tag {
00469 RingIO_NOTIFICATION_NONE = SysLink_NOTIFICATION_NONE,
00471 RingIO_NOTIFICATION_ALWAYS = SysLink_NOTIFICATION_ALWAYS,
00473 RingIO_NOTIFICATION_ONCE = SysLink_NOTIFICATION_ONCE,
00478 RingIO_NOTIFICATION_HDWRFIFO_ALWAYS =
00479 SysLink_NOTIFICATION_HDWRFIFO_ALWAYS,
00483 RingIO_NOTIFICATION_HDWRFIFO_ONCE =
00484 SysLink_NOTIFICATION_HDWRFIFO_ONCE
00490 } RingIO_NotifyType;
00491
00503 typedef void (* RingIO_NotifyFxn ) (RingIO_Handle, Ptr, RingIO_NotifyMsg);
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00529 Void RingIO_Params_init (Void * params);
00530
00552 RingIO_Handle RingIO_create(const Void *params);
00553
00571 Int RingIO_delete(RingIO_Handle *handlePtr);
00572
00590 UInt32 RingIO_sharedMemReq(const Void *params,
00591 RingIO_sharedMemReqDetails *sharedMemReqDetails);
00592
00593
00594
00595
00596
00618 Int RingIO_open(String name, const RingIO_openParams *params, UInt16 *procIds,
00619 RingIO_Handle *handlePtr);
00620
00643 Int RingIO_openByAddr(Ptr ctrlSharedAddr, const RingIO_openParams *params,
00644 RingIO_Handle *handlePtr);
00645
00665 Int RingIO_close(RingIO_Handle *handlePtr);
00666
00667
00668
00669
00670
00671
00706 Int RingIO_registerNotifier(RingIO_Handle handle,
00707 RingIO_NotifyType notifyType, UInt32 watermark,
00708 RingIO_NotifyFxn notifyFunc, Ptr cbContext);
00709
00726 Int RingIO_unregisterNotifier(RingIO_Handle handle);
00727
00740 Int RingIO_setWaterMark(RingIO_Handle handle, UInt32 watermark);
00741
00742
00756 Int RingIO_setNotifyType(RingIO_Handle handle, RingIO_NotifyType notifyType);
00757
00758
00759
00760
00761
00762
00806 Int RingIO_acquire(RingIO_Handle handle, RingIO_BufPtr *pData, UInt32 *pSize);
00807
00808
00809
00826 Int RingIO_release(RingIO_Handle handle, UInt32 size);
00827
00828
00847 Int RingIO_cancel(RingIO_Handle handle);
00848
00849
00884 Int RingIO_getvAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param,
00885 RingIO_BufPtr vptr, UInt32 *pSize);
00886
00887
00932 Int RingIO_setvAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
00933 RingIO_BufPtr pData, UInt32 size, Bool sendNotification);
00934
00935
00963 Int RingIO_getAttribute(RingIO_Handle handle, UInt16 *type, UInt32 *param);
00964
01003 Int RingIO_setAttribute(RingIO_Handle handle, UInt16 type, UInt32 param,
01004 Bool sendNotification);
01005
01006
01049 Int RingIO_flush(RingIO_Handle handle, Bool hardFlush, UInt16 *type,
01050 UInt32 *param, UInt32 *bytesFlushed);
01051
01052
01066 Int RingIO_sendNotify(RingIO_Handle handle, RingIO_NotifyMsg msg);
01067
01068
01069
01070
01071
01072
01081 UInt RingIO_getValidSize(RingIO_Handle handle);
01082
01091 UInt RingIO_getEmptySize(RingIO_Handle handle);
01092
01101 UInt RingIO_getValidAttrSize(RingIO_Handle handle);
01102
01111 UInt RingIO_getEmptyAttrSize(RingIO_Handle handle);
01112
01121 UInt RingIO_getAcquiredOffset(RingIO_Handle handle);
01122
01131 UInt RingIO_getAcquiredSize(RingIO_Handle handle);
01132
01141 UInt RingIO_getWaterMark(RingIO_Handle handle);
01142
01143 #ifndef SYSLINK_BUILDOS_QNX
01144
01145
01146
01147
01163 Void RingIO_getConfig(RingIO_Config *cfgParams);
01164
01189 Int RingIO_setup(const RingIO_Config *cfgParams);
01190
01202 Int RingIO_destroy(Void);
01203 #endif
01204
01205
01206 #if defined (__cplusplus)
01207 }
01208 #endif
01209
01210
01211 #endif