sys::Obj sox::SoxCommands
public class SoxCommands
SoxCommands processes all the sox command request/response.
public static Str tempKey
public static Str tempStr1
public static Str tempStr2
public static Str tempVal
public static void addReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'a' u1 replyNum u2 parentId u1 kitId u1 typeId str name val[] configProps
}
public static void addRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'A' u1 replyNum u2 compId
}
public static void deleteReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'd' u1 replyNum u2 compId
}
public static void eventRes(SoxService service, SoxSession session, SendPacket p)
req {
u1 'e' u1 replyNum u2 componentId compTree | compProps | compLinks }
public static void fileCloseReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'z' u1 replyNum
}
public static void fileCloseRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'Z' u1 replyNum
}
public static void fileOpenReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'f' u1 replyNum str method ("g" for get, "p" for put) str uri u4 fileSize u2 suggestedChunkSize (suggested by client) headers[] { str name str value } u1 end of headers '\0'
}
On a put, the fileSize is the number of bytes that will be written. On a get, the fileSize is the maximum number of bytes to read. You can read the whole file on a get by specifying fileSize as 0. The actual number of bytes read might be less if there are not fileSize bytes available (taking into account the size of the actual file, and the potential offset).
Supported Headers: Name Value Method Default Description ---- ----- ------ ------- ----------- offset int get, put 0 Byte offset to use when reading/writing the uri mode "w", "m" put "w" File mode to use (see sys::File)
public static void fileOpenRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'F' u1 replyNum u4 fileSize u2 actualChunkSize headers[] { str name str value } u1 end of headers '\0'
}
public static void fileReceiveChunk(SoxService service, SoxSession session)
Service a file chunk request (being put from client to me). NOTE: used by put (get uses fileSendChunk).
client -> k -> me req { u1 'k' u1 replyNum (ignored) u2 chunkNum u2 chunkSize u1[chunkSize] chunk }
public static void fileRenameReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'b' u1 replyNum str from str to
}
public static void fileSendChunk(SoxService service, SoxSession session, SendPacket res)
Send the client the next chunk of the file. NOTE: used by get (put uses fileReceiveChunk).
me -> k -> client req { u1 'k' u1 replyNum (ignored) u2 chunkNum u2 chunkSize u1[chunkSize] chunk }
public static void invokeReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'i' u1 replyNum u2 componentId u1 slotId val argument
}
public static void linkReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'l' u1 replyNum u1 'a' | 'd' (add/delete) u2 fromCompId u1 fromSlotId u2 toCompId u1 toSlotId
}
public static void process(SoxService service, SoxSession session)
Process the current message just received
public static void queryReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'q' u1 replyNum u1 queryType u1[] queryReq
}
queryType 's': query service req-service {
u1 kitId u1 typeId
}
public static void queryRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'Q' u1 replyNum u1[] queryRes
}
queryType 's': query service res-service {
u2[num] compIds u2 0xffff end marker
}
public static void readCompReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'c' u1 replyNum u2 componentId u1 what: 't', 'c', 'r', 'l' (tree, config, runtime, links)
}
public static void readCompRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'C' u1 replyNum u2 componentId compTree | compProps | compLinks
}
public static void readPropReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'r' u1 replyNum u2 compId u1 propId
}
public static void readPropRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'R' u1 replyNum u1 any code var propValue
}
public static void renameReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'n' u1 replyNum u2 compId str newName
}
public static void reorderReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'o' u1 replyNum u2 compId u1 numChildren u2[] childrenIds
}
public static void send(SoxService service, SoxSession session, SendPacket res)
public static void subscribeReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 's' u1 replyNum u1 whatMask: tree=0x01 config=0x02 rt=0x04 links=0x8 0xff all tree u1 size u2[] compIds
}
public static void subscribeRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'S' u1 replyNum u1 numSubscribed
}
public static void unsubscribeReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'u' u1 replyNum u2 componentId u1 whatMask: tree=0x1 config=0x2 rt=0x4 links=0x8 0xff all tree
}
public static void versionMoreRes(SoxService service, SoxSession session, SendPacket res)
res {
u1 'Y' u1 replyNum str platformId u1 scodeFlags kitVersions[kitCount] { str version } u1 pairs pairs { str key str val }
}
public static void versionRes(SoxService service, SoxSession session, SendPacket res)
versionRes {
u1 'V' u1 replyNum u1 kitCount kits[kitCount] { str name i4 checksum }
}
public static bool writeComp(SoxService service, SoxSession session, Component c, int what)
Write a component
- 't': writeCompTree - 'c': writeCompProps - 'r': writeCompProps - 'l': writeCompLinks
public static bool writeCompLinks(SoxService service, SoxSession session, Component c)
Write component links
compLinks { u1 'l' Link[] links u2 0xffff end marker }
public static bool writeCompProps(SoxService service, SoxSession session, Component c, int what)
Write component props (config or runtime)
compProps { u1 'c' or 'r' for config or runtime, 'C'/'R' if operator only val[] propValues }
public static bool writeCompTree(SoxService service, SoxSession session, Component c)
Write component tree information
compTree { u1 't' u1 kitId u1 typeId str name u2 parent u1 permissions u1 numKids u2[numKids] kidIds }
public static void writeReq(SoxService service, SoxSession session, SendPacket res)
req {
u1 'w' u1 replyNum u2 componentId u1 slotId val value
}