51#include "DitsInteraction.h"
67const unsigned DcppMaxArgs = 9999;
68const unsigned DcppArgNameLen = 13;
106 (
unsigned long Transferred,
127DPUBLIC
void Dcpp___UfaceDispatch(StatusType *
const status);
138 DitsUfaceCtxEnable(DitsActionRoutineType(Dcpp___UfaceDispatch),0,status);
177 DitsTransIdType transid,
216 DitsTransIdType transid,
251 StatusType exitStatus,
252 StatusType *
const status);
289 DitsPathInfoType bufInfo;
303 long int MaxMessages = 2,
304 long int ReplyBytes = 800,
305 long int MaxReplies = 2) {
306 bufInfo.MessageBytes = MessageBytes;
307 bufInfo.MaxMessages = MaxMessages;
308 bufInfo.ReplyBytes = ReplyBytes;
309 bufInfo.MaxReplies = MaxReplies;
320 operator const DitsPathInfoType * ()
const {
394 errorHandler(Error), triggerHandler(Trigger),
395 ersHandler(Ers), msgHandler(Msg), bulkTransHandler(0),
396 bulkDoneHandler(0), clientData(ClientData), task(Task),
414 errorHandler(Error), triggerHandler(Trigger),
415 ersHandler(Ers), msgHandler(Msg),
416 bulkTransHandler(BulkTrans), bulkDoneHandler(BulkDone),
417 clientData(ClientData), task(Task), forgotten(false)
457 return bulkTransHandler;}
513 Create = DITS_SHARE_CREATE,
519 Gblsec = DITS_SHARE_GBLSEC,
524 Global = DITS_SHARE_GLOBAL,
534 ShMem = DITS_SHARE_SHMEM,
540 MMap = DITS_SHARE_MMAP
548 DitsSharedMemInfoType info;
584 StatusType *
const status,
586 const int CreateIt =
true,
587 const char *
const Name =
"",
589 void *
const Address = 0
590 ) : valid(false), address(0), Structure(0), free(true) {
592 if (*status != STATUS__OK)
return;
598 DitsDefineShared(Type, (
char *)Name, Key, Size, CreateIt, &address,
600 if (*status == STATUS__OK)
628 const SdsId & Template,
629 StatusType *
const status,
631 const int CreateIt =
true,
632 const char *
const Name =
"",
634 void *
const Address = 0
635 ) : valid(false), address(0), Structure(0), free(true) {
637 if (*status != STATUS__OK)
return;
645 DitsDefineSdsShared(Template, Type, (
char *)Name, Key, CreateIt,
646 &address, &info, &ID, status);
647 if (*status == STATUS__OK)
675 SdsIdType ID = 0,
bool Free =
false)
676 : valid(true), address(Address), Structure(0), free(Free) {
690 void GetInfo(
const DitsSharedMemInfoType * *
const Info,
691 StatusType *
const status)
const {
692 if (*status != STATUS__OK)
return;
694 *status = DCPP__SHARENOVALID;
707 void GetInfo(DitsSharedMemInfoType * *
const Info,
708 StatusType *
const status) {
709 if (*status != STATUS__OK)
return;
711 *status = DCPP__SHARENOVALID;
748 void GetAddress(
const void **Address, StatusType *status)
const {
749 if (*status != STATUS__OK)
return;
751 *status = DCPP__SHARENOVALID;
753 *status = DCPP__SHARENOADD;
766 if (*status != STATUS__OK)
return;
768 *status = DCPP__SHARENOVALID;
777 StatusType status = STATUS__OK;
779 DitsReleaseShared(&info, 1, &status);
A C++ Interface to the SDS Arg library.
Definition arg.h:263
long int MessageBytes() const
Return the message bytes specification.
Definition dcpp.h:324
DcppBuffers(const DitsPathInfoType &i)
Construct a DcppBuffers object from a DitsPathInfoType variable.
Definition dcpp.h:317
DcppBuffers(long int MessageBytes=800, long int MaxMessages=2, long int ReplyBytes=800, long int MaxReplies=2)
Construct a DcppBuffers object from indivual specifications.
Definition dcpp.h:302
long int ReplyBytes() const
Return the reply bytes specification.
Definition dcpp.h:330
long int MaxReplies() const
Return the Max Replies specification.
Definition dcpp.h:333
long int MaxMessages() const
Return the Max Messages specification.
Definition dcpp.h:327
A structure representing message buffer sizes.
Definition dcpp.h:287
void GetInfo(DitsSharedMemInfoType **const Info, StatusType *const status)
Get share memory details - non-const version.
Definition dcpp.h:707
virtual ~DcppShared()
Destructor - free shared memory and SDS ID.
Definition dcpp.h:776
const SdsId & GetSds() const
Return Sds structure id - const version.
Definition dcpp.h:739
void GetAddress(void **Address, StatusType *status)
Return the shared memory address - non-const version.
Definition dcpp.h:765
DcppShared(long Size, StatusType *const status, const SharedType Type=Create, const int CreateIt=true, const char *const Name="", const int Key=0, void *const Address=0)
Basic Shared memory segment constructor.
Definition dcpp.h:582
DcppShared(DitsSharedMemInfoType *Info, void *Address=0, SdsIdType ID=0, bool Free=false)
Shared memory segment constructor - using existing segment.
Definition dcpp.h:674
SdsId & GetSds()
Return Sds structure id.
Definition dcpp.h:729
void GetInfo(const DitsSharedMemInfoType **const Info, StatusType *const status) const
Get share memory details - const version.
Definition dcpp.h:690
void GetAddress(const void **Address, StatusType *status) const
Return the shared memory address - const version.
Definition dcpp.h:748
SharedType
This enum gives the various shared memory types.
Definition dcpp.h:512
DcppShared(const SdsId &Template, StatusType *const status, const SharedType Type=Create, const int CreateIt=true, const char *const Name="", const int Key=0, void *const Address=0)
Shared memory segment constructor - for an SDS structure.
Definition dcpp.h:627
This is used to create and represent a shared memory segment.
Definition dcpp.h:499
A Class which provides access to DRAMA's message sending facilities.
Definition dcpptask.h:132
DcppTransaction(DcppTask *Task, const DcppHandlerRoutine Success=0, const DcppHandlerRoutine Error=0, const DcppHandlerRoutine Trigger=0, const DcppHandlerRoutine Ers=0, const DcppHandlerRoutine Msg=0, const DcppBulkTransRoutine BulkTrans=0, const DcppHandlerRoutine BulkDone=0, const DcppVoidPnt ClientData=0)
Constructor for bulk data transactions.
Definition dcpp.h:404
DcppHandlerRoutine TriggerHandler() const
Returns the trigger handler routine.
Definition dcpp.h:436
DcppHandlerRoutine SuccessHandler() const
Returns the success handler routine.
Definition dcpp.h:431
int check() const
Check indicates if the check value is correct
Definition dcpp.h:424
void Forget()
Forget the transaction.
Definition dcpp.h:486
DcppHandlerRet HandleEvent(StatusType *const status)
Handle the event.
DcppBulkTransRoutine BulkTransHandler() const
Return the bulk transfer message handler routine.
Definition dcpp.h:456
DcppVoidPnt ClientData() const
Return the client data item.
Definition dcpp.h:467
DcppHandlerRoutine ErsHandler() const
Return the Ers handler routine.
Definition dcpp.h:446
bool Forgotten() const
Indicate if the transaction was forgotten.
Definition dcpp.h:481
DcppHandlerRoutine BulkDoneHandler() const
Return the bulkd transfer done message handler routine.
Definition dcpp.h:462
DcppTask * Task() const
Return the associated DcppTask object.
Definition dcpp.h:472
DcppTransaction(DcppTask *Task, const DcppHandlerRoutine Success=0, const DcppHandlerRoutine Error=0, const DcppHandlerRoutine Trigger=0, const DcppHandlerRoutine Ers=0, const DcppHandlerRoutine Msg=0, const DcppVoidPnt ClientData=0)
Constructor for normal transactions.
Definition dcpp.h:386
DcppHandlerRoutine MsgHandler() const
Return the MsgOut handler routine.
Definition dcpp.h:451
DcppHandlerRoutine ErrorHandler() const
Returns the Error handler routine.
Definition dcpp.h:441
A type used to connect DcppHandler and DcppTask.
Definition dcpp.h:352
void ShallowCopy(SdsId &source, const bool outlives=true)
Shallow copy from SdsId.
Definition sds.h:1932
A C++ Interface to the handling SDS structures.
Definition sds.h:761
void DcppUfaceCtxEnable(StatusType *const status)
Enable handling of messages started in UFACE context.
Definition dcpp.h:137
void DcppForgetAll(void *client_data, int taskExit, StatusType exitStatus, StatusType *const status)
Forget all transaction assocaited with the current action.
void DcppVarArgsToSds(int count, Arg &ArgId, StatusType *status, va_list args)
Convert a variable argument list into an SDS structure.
void DcppSpawnKickArgUpdate(DitsTransIdType transid, const SdsId *id, StatusType *status)
Update an argument structure used when kick actions which spawn.
void * DcppVoidPnt
A pointer to void
Definition dcpp.h:59
void(* DcppBulkTransRoutine)(unsigned long Transferred, unsigned long Total, DcppVoidPnt ClientData, StatusType *status)
Type for call backs for DITS_REA_TRANSFERRED messages.
Definition dcpp.h:106
DcppHandlerRet DcppDispatch(StatusType *const status)
Basic message handler function.
const long int DcppCheckData
Internal use only.
Definition dcpp.h:345
DcppHandlerRet(* DcppHandlerRoutine)(DcppVoidPnt ClientData, StatusType *status)
Type for call backs when messages arrive.
Definition dcpp.h:92
DcppHandlerRet
Type returns by various routines to indicate what is to happen next.
Definition dcpp.h:75
@ DcppNotHandled
Only from DccpDisptach, message not handled.
Definition dcpp.h:76
@ DcppFinished
Have finished, action can complete
Definition dcpp.h:77
@ DcppReschedule
More messages expected, should reschedule.
Definition dcpp.h:75
void DcppSpawnKickArg(DitsTransIdType transid, SdsId *id, StatusType *status)
Create an argument structure used when kick actions which spawn.
DcppVoidPnt * DcppVoidPntPnt
A pointer to a pointer to void.
Definition dcpp.h:60
const unsigned DcppNodeNameLen
Maximum Node name length
Definition dcpp.h:57
const unsigned DcppArgumentLen
Maximum Node name length
Definition dcpp.h:58