Personal tools

Toaster:IrodsNotes

From Adapt

Jump to: navigation, search

Message Sending

  * 4 bytes, length of <nop>MsgHeader_PI</nop>
  * <nop>MsgHeader_PI</nop>, contains length of message (0 if no message)
  * Message, optional

Pack Instructions

These are defined in lib/core/include/rodsPackInstruct.h

MsgHeader_PI

#define MsgHeader_PI "str type[HEADER_TYPE_LEN]; int msgLen; int errorLen; int bsLen; int intInfo;"

XML Sample

<MsgHeader_PI>
<type>RODS_API_REQ</type>
<msgLen>264</msgLen>
<errorLen>0</errorLen>
<bsLen>0</bsLen>
<intInfo>633</intInfo>
</MsgHeader_PI>
  * type - one of RODS_API_REQ, RODS_API_REPLY, RODS_CONNECT, RODS_VERSION, 
  * int msgLen - Length of main msg
  * int errorLen - Length of error message
  * int bsLen - Length of byte stream
  * int intInto - An additional integer info, for API, it is the apiReqNum, see <nop>ApiNumber.h, for return this may be an error code


StartupPack_PI

#define StartupPack_PI "int irodsProt; int reconnFlag; int connectCnt; str proxyUser[NAME_LEN]; 
str proxyRcatZone[NAME_LEN]; str clientUser[NAME_LEN]; str clientRcatZone[NAME_LEN]; 
str relVersion[NAME_LEN]; str apiVersion[NAME_LEN]; str option[NAME_LEN];"

XML sample

<StartupPack_PI>
<irodsProt>1</irodsProt>
<reconnFlag>0</reconnFlag>
<connectCnt>0</connectCnt>
<proxyUser>rods</proxyUser>
<proxyRcatZone>tempZone</proxyRcatZone>
<clientUser>rods</clientUser>
<clientRcatZone>tempZone</clientRcatZone>
<relVersion>rods0.9</relVersion>
<apiVersion>b</apiVersion>
<option></option>
</StartupPack_PI>


Version_PI

#define Version_PI "int status; str relVersion[NAME_LEN]; str apiVersion[NAME_LEN]; int reconnPort; 
str reconnAddr[LONG_NAME_LEN]; int cookie;"


RErrMsg_PI

#define RErrMsg_PI "int status; str msg[ERR_MSG_LEN];"


RError_PI

#define RError_PI "int count; struct *RErrMsg_PI[count];"


GenQueryInp_PI

#define GenQueryInp_PI "int maxRows; int continueInx; int partialStartIndex; int options; struct KeyValPair_PI; 
struct InxIvalPair_PI; struct InxValPair_PI;"

XML Sample

<GenQueryInp_PI>
<maxRows>500</maxRows>
<continueInx>0</continueInx>
<partialStartIndex>0</partialStartIndex>
<options>0</options>
<KeyValPair_PI>
<ssLen>0</ssLen>
</KeyValPair_PI>
<InxIvalPair_PI>
<iiLen>3</iiLen>
<inx>501</inx>
<inx>403</inx>
<inx>401</inx>
<ivalue>1</ivalue>
<ivalue>1</ivalue>
<ivalue>1</ivalue>
</InxIvalPair_PI>
<InxValPair_PI>
<isLen>1</isLen>
<inx>501</inx>
<svalue> = '/tempZone/home/rods'</svalue>
</InxValPair_PI>
</GenQueryInp_PI>


  1. KeyValPair

KeyValPair_PI

#define KeyValPair_PI "int ssLen; str *keyWord[ssLen]; str *svalue[ssLen];" 

XML Sample

<KeyValPair_PI>
<ssLen>0</ssLen>
</KeyValPair_PI>


InxIvalPair_PI

#define InxIvalPair_PI "int iiLen; int *inx(iiLen); int *ivalue(iiLen);" 

XMl Sample

<InxIvalPair_PI>
<iiLen>3</iiLen>
<inx>501</inx>
<inx>403</inx>
<inx>401</inx>
<ivalue>1</ivalue>
<ivalue>1</ivalue>
<ivalue>1</ivalue>
</InxIvalPair_PI>


InxValPair_PI

#define InxValPair_PI "int isLen; int *inx(isLen); str *svalue[isLen];" 

XML sample

<InxValPair_PI>
<isLen>1</isLen>
<inx>501</inx>
<svalue> = '/tempZone/home/rods'</svalue>
</InxValPair_PI>

RODS_STAT_T_PI

#define RODS_STAT_T_PI "double st_size; int st_dev; int st_ino; int st_mode; int st_nlink; int st_uid; 
int st_gid; int st_rdev; int st_atim; int st_mtim; int st_ctim; int st_blksize; int st_blocks; int st_vfstype; 
int st_vfs; int st_type; int st_gen; int st_flag;"

RODS_DIRENT_T_PI

#define RODS_DIRENT_T_PI "int d_offset; int d_ino; int d_reclen; int d_namlen; str d_name[DIR_LEN];" 

DataObjInp_PI

#define DataObjInp_PI "str objPath[MAX_NAME_LEN]; int createMode; int openFlags; double offset; 
double dataSize; int numThreads; int oprType; struct *SpecColl_PI; struct KeyValPair_PI;"

PortList_PI

#define PortList_PI "int portNum; int cookie; int sock; int windowSize; str hostAddr[LONG_NAME_LEN];"

PortalOprOut_PI

#define PortalOprOut_PI "int status; int l1descInx; int numThreads; str chksum[NAME_LEN]; struct PortList_PI;"

DataOprInp_PI

#define DataOprInp_PI "int oprType; int numThreads; int srcL3descInx; int destL3descInx; 
int srcRescTypeInx; int destRescTypeInx; double offset; double dataSize; struct KeyValPair_PI;"

CollInp_PI

#define CollInp_PI "str collName[MAX_NAME_LEN]; struct KeyValPair_PI;"

SqlResult_PI

#define SqlResult_PI "int attriInx; int reslen; str *value(rowCnt)(reslen);"  

GenQueryOut_PI

#define GenQueryOut_PI "int rowCnt; int attriCnt; int continueInx; int totalRowCount; struct SqlResult_PI[MAX_SQL_ATTR];"

DataObjInfo_PI

#define DataObjInfo_PI "str objPath[MAX_NAME_LEN]; str rescName[NAME_LEN]; str rescGroupName[NAME_LEN]; 
str dataType[NAME_LEN]; double dataSize; str chksum[NAME_LEN]; str version[NAME_LEN]; str filePath[MAX_NAME_LEN]; 
str *rescInfo; str dataOwnerName[NAME_LEN]; str dataOwnerZone[NAME_LEN]; int  replNum; int  replStatus; 
str statusString[NAME_LEN]; double  dataId; double collId; int  dataMapId; str dataComments[LONG_NAME_LEN]; 
str dataExpiry[TIME_LEN]; str dataCreate[TIME_LEN]; str dataModify[TIME_LEN]; str dataAccess[NAME_LEN]; 
int  dataAccessInx; str destRescName[NAME_LEN]; str backupRescName[NAME_LEN]; str subPath[MAX_NAME_LEN]; 
int *specColl; int *next;"

TransStat_PI

#define TransStat_PI "int numThreads; double bytesWritten;"

RescGrpInfo_PI

#define RescGrpInfo_PI "str rescGroupName[NAME_LEN]; str *rescName; int *cacheNext; struct *RescGrpInfo_PI;"

AuthInfo_PI

#define AuthInfo_PI "str authScheme[NAME_LEN]; int authFlag; int flag; int ppid; str host[NAME_LEN]; str authStr[NAME_LEN];"

UserOtherInfo_PI

#define UserOtherInfo_PI "str userInfo[NAME_LEN]; str userComments[NAME_LEN]; str userCreate[TIME_LEN]; str userModify[TIME_LEN];"

UserInfo_PI

#define UserInfo_PI "str userName[NAME_LEN]; str rodsZone[NAME_LEN]; str userType[NAME_LEN]; int sysUid; struct AuthInfo_PI; struct UserOtherInfo_PI;"

CollInfo_PI

#define CollInfo_PI "double collId; str collName[MAX_NAME_LEN]; str collParentName[MAX_NAME_LEN]; 
str collOwnerName[NAME_LEN]; str collOwnerZone[NAME_LEN]; int collMapId; str collComments[LONG_NAME_LEN]; 
str collInheritance[LONG_NAME_LEN]; str collExpiry[TIME_LEN]; str collCreate[TIME_LEN]; 
str collModify[TIME_LEN]; str collAccess[NAME_LEN]; int collAccessInx; str collType[NAME_LEN]; 
str collInfo1[MAX_NAME_LEN]; str collInfo2[MAX_NAME_LEN]; int *next;"

Rei_PI

#define Rei_PI "int status; str statusStr[MAX_NAME_LEN]; int *rsComm;struct *MsParamArray_PI; 
struct MsParamArray_PI; int l1descInx; struct *DataObjInp_PI; struct *DataOprInp_PI; struct *fileOpenInp_PI; 
struct *DataObjInfo_PI; struct *RescGrpInfo_PI; struct *UserInfo_PI; struct *UserInfo_PI; 
struct *CollInfo_PI; struct *DataObjInp_PI; struct *DataOprInp_PI; struct *fileOpenInp_PI; 
struct *RescGrpInfo_PI; struct *UserInfo_PI; struct *KeyValPair_PI; str ruleSet[RULE_SET_DEF_LENGTH]; int *next;" 

ReArg_PI

#define ReArg_PI "int myArgc; str *myArgv[myArgc];"

ReiAndArg_PI

#define ReiAndArg_PI "struct *Rei_PI; struct ReArg_PI;"

BytesBuf_PI

#define BytesBuf_PI "int buflen; char *buf(buflen);"

BinBytesBuf_PI

#define BinBytesBuf_PI "int buflen; bin *buf(buflen);"

MsParam_PI

#define MsParam_PI "str *label; piStr *type; ?type *inOutStruct; struct *BinBytesBuf_PI;"

MsParamArray_PI

#define MsParamArray_PI "int paramLen; int oprType; struct *MsParam_PI[paramLen];"

TagStruct_PI

#define TagStruct_PI "int ssLen; str *preTag[ssLen]; str *postTag[ssLen]; str *keyWord[ssLen];" 

RodsObjStat_PI

#define RodsObjStat_PI "double objSize; int objType; int numCopies; str dataId[NAME_LEN]; 
str chksum[NAME_LEN]; str ownerName[NAME_LEN]; str ownerZone[NAME_LEN]; str createTime[TIME_LEN]; 
str modifyTime[TIME_LEN]; struct *SpecColl_PI;" 

ReconnMsg_PI

#define ReconnMsg_PI "int cookie; int reconnOpr;"

VaultPathPolicy_PI

#define VaultPathPolicy_PI "int scheme; int addUserName; int trimDirCnt;"

StrArray_PI

#define StrArray_PI "int len; int size; str *value(len)(size);" 

IntArray_PI

#define IntArray_PI "int len; int *value(len);" 

-- Main.MikeSmorul - 11 Dec 2007