.NET Extension Design (#5)
* Designed .NET classes from Java Co-authored-by: Sergiy <sergiy.yermak.ctr@us.navy.mil> * Added NormApi static class * Started on api uml Co-authored-by: mullerj <mullerj@users.noreply.github.com> Co-authored-by: Sylvester Freeman III <Slyfree3@users.noreply.github.com> * Add static methods to api uml * add static method to normapi uml * Add enums * Changes * Overload methods with defaults * type marshalling * change handles to in nuint * marshall more handles * Removed in/ref and reformatted. Co-authored-by: mullerj <mullerj@users.noreply.github.com> * Removed duplicate enums * Removed NormEvent from NormApi * Fixed typo * design NormInstance methods Co-authored-by: mullerj <mullerj@users.noreply.github.com> * Fixed CreateInstance method * Changed handles to long * Change id types to long * Remove condition checks that do nothing * Removed UserData functions * Removed NormAlloc() and NormFree() * Cleaned up some API methods * Fix misspelling Co-authored-by: Sylvester Freeman III <Slyfree3@users.noreply.github.com> * Design NormSession methods Co-authored-by: Sylvester Freeman III <Slyfree3@users.noreply.github.com> * Added missing comma * Uml for enqueue Co-authored-by: mullerj <mullerj@users.noreply.github.com> * Updated design based on enqueue test * Updated EnqueueFile sequence diagram Co-authored-by: Sylvester Freeman III <Slyfree3@users.noreply.github.com> * Moved sequence diagrams * Added constants to NormApi * Removed method level sequence diagrams --------- Co-authored-by: Sergiy <sergiy.yermak.ctr@us.navy.mil> Co-authored-by: syermak <syerm001@odu.edu> Co-authored-by: mullerj <mullerj@users.noreply.github.com> Co-authored-by: Sylvester Freeman III <Slyfree3@users.noreply.github.com> Co-authored-by: Sergiy <47069243+SergiyYermak@users.noreply.github.com> Co-authored-by: Sylvester Freeman III <Slyfreeman3@gmail.com>pull/85/head
parent
b8ce922a36
commit
3a20a8bcb2
|
|
@ -0,0 +1,8 @@
|
|||
@startuml
|
||||
enum NormAckingStatus {
|
||||
NORM_ACK_INVALID
|
||||
NORM_ACK_FAILURE
|
||||
NORM_ACK_PENDING
|
||||
NORM_ACK_SUCCESS
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
@startuml
|
||||
enum NormEventType {
|
||||
NORM_EVENT_INVALID
|
||||
NORM_TX_QUEUE_VACANCY
|
||||
NORM_TX_QUEUE_EMPTY
|
||||
NORM_TX_FLUSH_COMPLETED
|
||||
NORM_TX_WATERMARK_COMPLETED
|
||||
NORM_TX_CMD_SENT
|
||||
NORM_TX_OBJECT_SENT
|
||||
NORM_TX_OBJECT_PURGED
|
||||
NORM_TX_RATE_CHANGED
|
||||
NORM_LOCAL_SENDER_CLOSED
|
||||
NORM_REMOTE_SENDER_NEW
|
||||
NORM_REMOTE_SENDER_RESET
|
||||
NORM_REMOTE_SENDER_ADDRESS
|
||||
NORM_REMOTE_SENDER_ACTIVE
|
||||
NORM_REMOTE_SENDER_INACTIVE
|
||||
NORM_REMOTE_SENDER_PURGED
|
||||
NORM_RX_CMD_NEW
|
||||
NORM_RX_OBJECT_NEW
|
||||
NORM_RX_OBJECT_INFO
|
||||
NORM_RX_OBJECT_UPDATED
|
||||
NORM_RX_OBJECT_COMPLETED
|
||||
NORM_RX_OBJECT_ABORTED
|
||||
NORM_RX_ACK_REQUEST
|
||||
NORM_GRTT_UPDATED
|
||||
NORM_CC_ACTIVE
|
||||
NORM_CC_INACTIVE
|
||||
NORM_ACKING_NODE_NEW
|
||||
NORM_SEND_ERROR
|
||||
NORM_USER_TIMEOUT
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
enum NormFecType {
|
||||
RS
|
||||
RS8
|
||||
SB
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
enum NormFlushMode {
|
||||
NORM_FLUSH_NONE
|
||||
NORM_FLUSH_PASSIVE
|
||||
NORM_FLUSH_ACTIVE
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
enum NormNackingMode {
|
||||
ORM_NACK_NONE
|
||||
NORM_NACK_INFO_ONLY
|
||||
NORM_NACK_NORMAL
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@startuml
|
||||
enum NormObjectType {
|
||||
NORM_OBJECT_NONE
|
||||
NORM_OBJECT_DATA
|
||||
NORM_OBJECT_FILE
|
||||
NORM_OBJECT_STREAM
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
enum NormProbingMode {
|
||||
NORM_PROBE_NONE
|
||||
NORM_PROBE_PASSIVE
|
||||
NORM_PROBE_ACTIVE
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
@startuml
|
||||
enum NormRepairBoundary {
|
||||
NORM_BOUNDARY_BLOCK
|
||||
NORM_BOUNDARY_OBJECT
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
enum NormSyncPolicy {
|
||||
NORM_SYNC_CURRENT
|
||||
NORM_SYNC_STREAM
|
||||
NORM_SYNC_ALL
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
@startuml
|
||||
enum NormTrackingStatus
|
||||
{
|
||||
NORM_TRACK_NONE
|
||||
NORM_TRACK_RECEIVERS
|
||||
NORM_TRACK_SENDERS
|
||||
NORM_TRACK_ALL
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@startuml
|
||||
interface INormEventListener {
|
||||
NormEventOccurred(normEvent:NormEvent) : void
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
@startuml
|
||||
class NormInputStream {
|
||||
- _normInstance : NormInstance
|
||||
- _normSession : NormSession
|
||||
- _normStream : NormStream
|
||||
- _normEventListeners : List<INormEventListener>
|
||||
- _closed : bool
|
||||
- _closeLock : object
|
||||
- _bufferIsEmpty : bool
|
||||
- _receivedEof : bool
|
||||
+ NormInputStream(address:string, port:int)
|
||||
+ OpenDebugLog(filename:string) : void
|
||||
+ SetDebugLevel(level:int) : void
|
||||
+ SetMessageTrace(messageTrace:bool) : void
|
||||
+ SetMulticastInterface(multicastInterface: string) : void
|
||||
+ SetEcnSupport(ecnEnable:bool, ignoreLoss:bool)
|
||||
+ SetTtl(ttl:byte) : void
|
||||
+ SetTos(tos:byte) : void
|
||||
+ SetSilentReceiver(silent:bool, maxDelay:int) : void
|
||||
+ SetDefaultUnicastNack(defaultUnicastNack:bool) : void
|
||||
+ SeekMsgStart() : void
|
||||
+ AddNormEventListener(normEventListener:INormEventListener) : void
|
||||
+ RemoveNormEventListener(normEventListener:INormEventListener) : void
|
||||
- FireNormEventOccured(normEvent:NormEvent) : void
|
||||
+ Open(bufferSpace:long) : void
|
||||
+ <<override>> Dispose() : void
|
||||
+ IsClosed : bool <<get>>
|
||||
+ Read() : int
|
||||
+ <<override>> Read(buffer:byte[], offset:int, length:int) : int
|
||||
- ProcessEvent() : void
|
||||
}
|
||||
Stream <|-- NormInputStream
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
@startuml
|
||||
class NormOutputStream {
|
||||
- _normInstance : NormInstance
|
||||
- _normSession : NormSession
|
||||
- _normStream : NormStream
|
||||
- _normEventListeners : List<INormEventListener>
|
||||
- _closed : bool
|
||||
- _closeLock : object
|
||||
- _bufferIsFull : bool
|
||||
+ NormOutputStream(address:string, port:int)
|
||||
+ OpenDebugLog(filename:string) : void
|
||||
+ CloseDebugLog() : void
|
||||
+ SetDebugLevel(level:int) : void
|
||||
+ SetMessageTrace(messageTrace:bool) : void
|
||||
+ SetMulticastInterface(multicastInterface:string) : void
|
||||
+ SetEcnSupport(ecnEnable:bool, ignoreLoss:bool): void
|
||||
+ SetTtl(ttl:byte) : void
|
||||
+ SetTos(tos:byte) : void
|
||||
+ SetCongestionControl(ccEnabled:bool, ccAdjustRate: bool) : void
|
||||
+ SetTxRateBounds(rateMin:double, rateMax:double) : void
|
||||
+ TxRate:double <<get>> <<set>>
|
||||
+ GrttEstimate:double <<get>> <<set>>
|
||||
+ SetGroupSize(groupSize:long) : void
|
||||
+ SetAutoParity(autoParity:short) : void
|
||||
+ SetBackoffFactor(backoffFactor:double) : void
|
||||
+ SetAutoFlush(flushMode:NormFlushMode) : void
|
||||
+ SetPushEnable(pushEnable:bool) : void
|
||||
+ MarkEom() : void
|
||||
+ AddNormEventListener(normEventListener:INormEventListener) : void
|
||||
+ RemoveNormEventListener(normEventListener:INormEventListener): void
|
||||
- FireNormEventOccured(normEvent:NormEvent) : void
|
||||
+ Open(sessionId:int, bufferSpace:long, segmentSize:int, blockSize:short, numParity:short, repairWindow:long) : void
|
||||
+ <<override>> Dispose() : void
|
||||
+ IsClosed : bool <<get>>
|
||||
+ Write(b:int) : void
|
||||
+ <<override>> Write(buffer:byte[], offset:int, count:int)
|
||||
- ProcessEvent() : void
|
||||
}
|
||||
Stream <|-- NormOutputStream
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
@startuml
|
||||
class StreamBreakException {
|
||||
+ StreamBreakException(message:string)
|
||||
}
|
||||
IOException <|-- StreamBreakException
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
@startuml
|
||||
class NormApi
|
||||
{
|
||||
+ <<const>> NORM_OBJECT_INVALID : int = 0
|
||||
+ <<const>> FILENAME_MAX : int = 260
|
||||
+ <<const>> NORM_LIBRARY : string = "norm"
|
||||
+ {static} NormGetVersion(major:int, minor:int, patch:int) : int
|
||||
+ {static} NormCreateInstance() : long
|
||||
+ {static} NormCreateInstance(priorityBoost:bool) : long
|
||||
+ {static} NormDestroyInstance(instanceHandle:long) : void
|
||||
+ {static} NormStopInstance(instanceHandle:long) : void
|
||||
+ {static} NormRestartInstance(instanceHandle:long) : bool
|
||||
+ {static} NormSuspendInstance(instanceHandle:long) : bool
|
||||
+ {static} NormResumeInstance(instanceHandle:long) : void
|
||||
+ {static} NormSetCacheDirectory(instanceHandle:long, cachePath:string) : bool
|
||||
+ {static} NormGetNextEvent(instanceHandle:long, theEvent:NormEvent) : bool
|
||||
+ {static} NormGetNextEvent(instanceHandle:long, theEvent:NormEvent, waitForEvent:bool) : bool
|
||||
+ {static} NormGetDescriptor(instanceHandle:long) : NormDescriptor
|
||||
+ {static} NormCreateSession(instanceHandle:long, sessionAddress:string, sessionPort:int, localNodeId:long) : long
|
||||
+ {static} NormDestroySession(sessionHandle:long) : void
|
||||
+ {static} NormGetInstance(sessionHandle:long) : long
|
||||
+ {static} NormIsUnicastAddress(address:string) : bool
|
||||
+ {static} NormSetUserTimer(sessionHandle:long, seconds:double) : void
|
||||
+ {static} NormCancelUserTimer(sessionHandle:long) : void
|
||||
+ {static} NormGetLocalNodeId(sessionHandle:long) : long
|
||||
+ {static} NormGetAddress(sessionHandle:long, addrBuffer:string, bufferLen:uint) : bool
|
||||
+ {static} NormGetAddress(sessionHandle:long, addrBuffer:string, bufferLen:uint, port:ushort) : bool
|
||||
+ {static} NormGetRxPort(sessionHandle:long) : ushort
|
||||
+ {static} NormSetTxPort(sessionHandle:long, txPortNumber:ushort) : bool
|
||||
+ {static} NormSetTxPort(sessionHandle:long, txPortNumber:ushort, enableReuse:bool, txBindAddress:string) : bool
|
||||
+ {static} NormGetTxPort(sessionHandle:long) : ushort
|
||||
+ {static} NormSetTxOnly(sessionHandle:long, txOnly:bool) : void
|
||||
+ {static} NormSetTxOnly(sessionHandle:long, txOnly:bool, connectToSessionAddress:bool) : void
|
||||
+ {static} NormLimitObjectInfo(sessionHandle:long, state:bool) : void
|
||||
+ {static} NormPresetObjectInfo(sessionHandle:long, objectSize:ulong, segmentSize:ushort, numData:ushort, numParity:ushort) : bool
|
||||
+ {static} NormSetId(sessionHandle:long, normId:long) : void
|
||||
+ {static} NormChangeDestination(sessionHandle:long, sessionAddress:string, sessionPort:ushort) : bool
|
||||
+ {static} NormChangeDestination(sessionHandle:long, sessionAddress:string, sessionPort:ushort, connectToSessionAddress:bool) : bool
|
||||
+ {static} NormSetServerListner(sessionHandle:long, state:bool) : void
|
||||
+ {static} NormTransferSender(sessionHandle:long, sender:long) : bool
|
||||
+ {static} NormSetRxPortReuse(sessionHandle:long, enableReuse:bool) : void
|
||||
+ {static} NormSetRxPortReuse(sessionHandle:long, enableReuse:bool, rxBindAddress:string, senderAddress:string, senderPort:ushort) : void
|
||||
+ {static} NormGetRxBindAddress(sessionHandle:long, addr:string, addrLen:uint, port:ushort) : bool
|
||||
+ {static} NormSetEcnSupport(sessionHandle:long, ecnEnable:bool) : void
|
||||
+ {static} NormSetEcnSupport(sessionHandle:long, ecnEnable:bool, ignoreLoss:bool, tolerateLoss:bool) : void
|
||||
+ {static} NormSetMulticastInterface(sessionHandle:long, interfaceName:string) : bool
|
||||
+ {static} NormSetSSM(sessionHandle:long, sourceAddress:string) : bool
|
||||
+ {static} NormSetTTL(sessionHandle:long, ttl:byte) : bool
|
||||
+ {static} NormSetTOS(sessionHandle:long, tos:byte) : bool
|
||||
+ {static} NormSetLoopback(sessionHandle:long, loopback:bool) : bool
|
||||
+ {static} NormSetMulticastLoopback(sessionHandle:long, loopback:bool) : bool
|
||||
+ {static} NormSetFragmentation(sessionHandle:long, fragmentation:bool) : bool
|
||||
+ {static} NormSetMessageTrace(sessionHandle:long, state:bool) : void
|
||||
+ {static} NormSetTxLoss(sessionHandle:long, precent:double) : void
|
||||
+ {static} NormSetRxLoss(sessionHandle:long, precent:double) : void
|
||||
+ {static} NormOpenDebugLog(instanceHandle:long, path:string) : bool
|
||||
+ {static} NormCloseDebugLog(instanceHandle:long) : void
|
||||
+ {static} NormOpenDebugPipe(instanceHandle:long, pipeName:string) : bool
|
||||
+ {static} NormCloseDebugPipe(instanceHandle:long) : void
|
||||
+ {static} NormSetDebugLevel(level:int) : void
|
||||
+ {static} NormGetDebugLevel() : int
|
||||
+ {static} NormSetReportInterval(sessionHandle:long, interval:double) : void
|
||||
+ {static} NormGetReportInterval(sessionHandle:long) : double
|
||||
+ {static} NormGetRandomSessionId() : int
|
||||
+ {static} NormStartSender(sessionHandle:long, instanceId:int, bufferSpace:long, segmentSize:int, numData:short, numParity:short) : bool
|
||||
+ {static} NormStartSender(sessionHandle:long, instanceId:int, bufferSpace:long, segmentSize:int, numData:short, numParity:short, fecId:NormFecType) : bool
|
||||
+ {static} NormStopSender(sessionHandle:long) : void
|
||||
+ {static} NormSetTxRate(sessionHandle:long, bitsPerSecond:double) : void
|
||||
+ {static} NormGetTxRate(sessionHandle:long) : double
|
||||
+ {static} NormSetTxSocketBuffer(sessionHandle:long, bufferSize:uint) : bool
|
||||
+ {static} NormSetFlowControl(sessionHandle:long, flowControlFactor:double) : void
|
||||
+ {static} NormSetCongestionControl(sessionHandle:long, enable:bool) : void
|
||||
+ {static} NormSetCongestionControl(sessionHandle:long, enable:bool, adjustRate:bool) : void
|
||||
+ {static} NormSetTxRateBounds(sessionHandle:long, rateMin:double, rateMax:double) : void
|
||||
+ {static} NormSetTxCacheBounds(sessionHandle:long, sizeMax:long, countMin:long, countMax:long) : void
|
||||
+ {static} NormSetAutoParity(sessionHandle:long, autoParity:byte) : void
|
||||
+ {static} NormSetGrttEstimate(sessionHandle:long, grttEstimate:double) : void
|
||||
+ {static} NormGetGrttEstimate(sessionHandle:long) : double
|
||||
+ {static} NormSetGrttMax(sessionHandle:long, grttMax:double) : void
|
||||
+ {static} NormSetGrttProbingMode(sessionHandle:long, probingMode:NormProbingMode) : void
|
||||
+ {static} NormSetGrttProbingInterval(sessionHandle:long, intervalMin:double, intervalMax:double) : void
|
||||
+ {static} NormSetGrttProbingTOS(sessionHandle:long, probeTOS:byte) : void
|
||||
+ {static} NormSetBackoffFactor(sessionHandle:long, backoffFactor:double) : void
|
||||
+ {static} NormSetGroupSize(sessionHandle:long, groupSize:uint) : void
|
||||
+ {static} NormSetTxRobustFactor(sessionHandle:long, robustFactor:int) : void
|
||||
+ {static} NormFileEnqueue(sessionHandle:long, fileName:string): long
|
||||
+ {static} NormFileEnqueue(sessionHandle:long, fileName:string, infoPtr:string, infoLen:int): long
|
||||
+ {static} NormDataEnqueue(sessionHandle:long, dataPtr:string, dataLen:int) : long
|
||||
+ {static} NormDataEnqueue(sessionHandle:long, dataPtr:string, dataLen:int, infoPtr:string, infoLen:int) : long
|
||||
+ {static} NormRequeueObject(sessionHandle:long, objectHandle:long) : bool
|
||||
+ {static} NormStreamOpen(sessionHandle:long, bufferSize:long) : long
|
||||
+ {static} NormStreamOpen(sessionHandle:long, bufferSize:long, infoPtr:string, infoLen:int) : long
|
||||
+ {static} NormStreamClose(streamHandle:long) : void
|
||||
+ {static} NormStreamClose(streamHandle:long, graceful:bool) : void
|
||||
+ {static} NormGetStreamBufferSegmentCount(bufferBytes:uint, segmentSize:ushort, blockSize:ushort) : uint
|
||||
+ {static} NormStreamWrite(streamHandle:long, buffer:string, numBytes:uint) : uint
|
||||
+ {static} NormStreamFlush(streamHandle:long) : void
|
||||
+ {static} NormStreamFlush(streamHandle:long, eom:bool, flushMode:NormFlushMode) : void
|
||||
+ {static} NormStreamSetAutoFlush(streamHandle:long, flushMode: NormFlushMode) : void
|
||||
+ {static} NormStreamSetPushEnable(streamHandle:long, pushEnable:bool) : void
|
||||
+ {static} NormStreamHasVacancy(streamHandle:long) : bool
|
||||
+ {static} NormStreamGetVacancy(streamHandle:long, bytesWanted:uint) : uint
|
||||
+ {static} NormStreamMarkEom(streamHandle:long) : void
|
||||
+ {static} NormSetWatermark(sessionHandle:long, objectHandle:long) : bool
|
||||
+ {static} NormSetWatermark(sessionHandle:long, objectHandle:long, overrideFlush:bool) : bool
|
||||
+ {static} NormSetWatermarkEx(sessionHandle:long, objectHandle:long, buffer:string, numBytes:uint) : bool
|
||||
+ {static} NormSetWatermarkEx(sessionHandle:long, objectHandle:long, buffer:string, numBytes:uint, overrideFlush:bool) : bool
|
||||
+ {static} NormResetWatermark(sessionHandle:long) : bool
|
||||
+ {static} NormCancelWatermark(sessionHandle:long) : void
|
||||
+ {static} NormAddAckingNode(sessionHandle:long, nodeId:long) : bool
|
||||
+ {static} NormRemoveAckingNode(sessionHandle:long, nodeId:long) : void
|
||||
+ {static} NormGetAckingNodeHandle(sessionHandle:long, nodeId:long) : long
|
||||
+ {static} NormSetAutoAckingNodes(sessionHandle:long, trackingStatus:NormTrackingStatus) : void
|
||||
+ {static} NormGetAckingStatus(sessionHandle:long) : NormAckingStatus
|
||||
+ {static} NormGetAckingStatus(sessionHandle:long, nodeId:long) : NormAckingStatus
|
||||
+ {static} NormGetNextAckingNode(sessionHandle:long, nodeId:long) : bool
|
||||
+ {static} NormGetNextAckingNode(sessionHandle:long, nodeId:long, ackingStatus:NormAckingStatus) : bool
|
||||
+ {static} NormGetAckEx(sessionHandle:long, nodeId:long, buffer:string, buflen:uint) : bool
|
||||
+ {static} NormSendCommand(sessionHandle:long, cmdBuffer:string, cmdLength:uint) : bool
|
||||
+ {static} NormSendCommand(sessionHandle:long, cmdBuffer:string, cmdLength:uint, robust:bool) : bool
|
||||
+ {static} NormCancelCommand(sessionHandle:long) : void
|
||||
+ {static} NormSetSynStatus(sessionHandle:long, state:bool) : void
|
||||
+ {static} NormStartReceiver(sessionHandle:long, bufferSpace:long) : bool
|
||||
+ {static} NormStopReceiver(sessionHandle:long) : void
|
||||
+ {static} NormSetRxCacheLimit(sessionHandle:long, countMax:ushort) : void
|
||||
+ {static} NormSetRxSocketBuffer(sessionHandle:long, bufferSize:uint) : bool
|
||||
+ {static} NormSetSilentReceiver(sessionHandle:long, silent:bool) : void
|
||||
+ {static} NormSetSilentReceiver(sessionHandle:long, silent:bool, maxDelay:int) : void
|
||||
+ {static} NormSetDefaultUnicastNack(sessionHandle:long, unicastNacks:bool) : void
|
||||
+ {static} NormNodeSetUnicastNack(remoteSender:long, unicastNacks:bool) : void
|
||||
+ {static} NormSetDefaultSyncPolicy(sessionHandle:long, syncPolicy:NormSyncPolicy) : void
|
||||
+ {static} NormSetDefaultNackingMode(sessionHandle:long, nackingMode:NormNackingMode) : void
|
||||
+ {static} NormNodeSetNackingMode(remoteSender:long, nackingMode:NormNackingMode) : void
|
||||
+ {static} NormObjectSetNackingMode(objectHandle:long, nackingMode:NormNackingMode) : void
|
||||
+ {static} NormSetDefaultRepairBoundary(sessionHandle:long, repairBoundary:NormRepairBoundary) : void
|
||||
+ {static} NormNodeSetRepairBoundary(remoteSender:long, repairBoundary:NormRepairBoundary) : void
|
||||
+ {static} NormSetDefaultRxRobustFactor(sessionHandle:long, robustFactor:int) : void
|
||||
+ {static} NormNodeSetRxRobustFactor(remoteSenderremoteSender, robustFactor:int) : void
|
||||
+ {static} NormPreallocateRemoteSender(sessionHandle:long, bufferSize:ulong, segmentSize:ushort, numData:ushort, numParity:ushort) : bool
|
||||
+ {static} NormPreallocateRemoteSender(sessionHandle:long, bufferSize:ulong, segmentSize:ushort, numData:ushort, numParity:ushort, streamBufferSize:uint) : bool
|
||||
+ {static} NormStreamRead(streamHandle:long, buffer:string, numBytes:uint) : bool
|
||||
+ {static} NormStreamSeekMsgStart(streamHandle:long) : bool
|
||||
+ {static} NormStreamGetReadOffset(streamHandle:long) : uint
|
||||
+ {static} NormStreamGetBufferUsage(streamHandle:long) : uint
|
||||
+ {static} NormObjectGetType(objectHandle:long) : NormObjectType
|
||||
+ {static} NormObjectHasInfo(objectHandle:long) : bool
|
||||
+ {static} NormObjectGetInfoLength(objectHandle:long) : ushort
|
||||
+ {static} NormObjectGetInfo(objectHandle:long, buffer:char, bufferLen:ushort) : ushort
|
||||
+ {static} NormObjectGetSize(objectHandle:long) : int
|
||||
+ {static} NormObjectGetBytesPending(objectHandle:long) : int
|
||||
+ {static} NormObjectCancel(objectHandle:long) : void
|
||||
+ {static} NormObjectRetain(objectHandle:long) : void
|
||||
+ {static} NormObjectRelease(objectHandle:long) : void
|
||||
+ {static} NormFileGetName(fileHandle:long, nameBuffer:string, bufferLen:int) : bool
|
||||
+ {static} NormFileRename(fileHandle:long, fileName:string) : bool
|
||||
+ {static} NormDataAccessData(objectHandle:long) : string
|
||||
+ {static} NormDataDetachData(objectHandle:long) : string
|
||||
+ {static} NormObjectGetSender(objectHandle:long) : long
|
||||
+ {static} NormNodeGetId(nodeHandle:long) : uint
|
||||
+ {static} NormNodeGetAddress(nodeHandle:long, addrBuffer:string, bufferLen: uint) : bool
|
||||
+ {static} NormNodeGetAddress(nodeHandle:long, addrBuffer:string, bufferLen: uint, port:ushort) : bool
|
||||
+ {static} NormNodeGetGrtt(remoteSender:long) : double
|
||||
+ {static} NormNodeGetCommand(remoteSender:long, :string, buflen:uint) : bool
|
||||
+ {static} NormNodeSendAckEx(remoteSender:long, buffer:string, numBytes:uint) : bool
|
||||
+ {static} NormNodeGetWatermarkEx(remoteSender:long, buffer:string, buflen:uint) : bool
|
||||
+ {static} NormNodeFreeBuffers(remoteSender:long) : void
|
||||
+ {static} NormNodeDelete(remoteSender:long) : void
|
||||
+ {static} NormNodeRetain(nodeHandle:long) : void
|
||||
+ {static} NormNodeRelease(nodeHandle:long) : void
|
||||
+ {static} NormReleasePreviousEvent(instanceHandle:long) : void
|
||||
+ {static} NormCountCompletedObjects(sessionHandle:long) : uint
|
||||
+ {static} NormNodeSetAutoDelete(remoteSender:long, autoDelete:bool) : void
|
||||
+ {static} NormNodeAllowSender(senderId:long) : bool
|
||||
+ {static} NormNodeDenySender(senderId:long) : bool
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
@startuml
|
||||
class NormData {
|
||||
~ NormData(handle:long)
|
||||
+ byte[] Data <<get>>
|
||||
}
|
||||
NormObject <|-- NormData
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
@startuml
|
||||
class NormEvent {
|
||||
- _type: NormEventType
|
||||
- _sessionHandle: long
|
||||
- _nodeHandle: long
|
||||
- _objectHandle: long
|
||||
+ NormEvent(type:NormEventType, sessionHandle:long, nodeHandle:long, objectHandle:long)
|
||||
+ Type : NormEventType <<get>>
|
||||
+ Session : NormSession <<get>>
|
||||
+ Node : NormNode <<get>>
|
||||
+ Object : NormObject <<get>>
|
||||
+ <<override>> ToString() : string
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
@startuml
|
||||
class NormFile {
|
||||
~ NormFile(handle:long)
|
||||
+ Name : string <<get>>
|
||||
+ Rename(filename:string) : void
|
||||
}
|
||||
NormObject <|-- NormFile
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
@startuml
|
||||
class NormInstance {
|
||||
- _handle: long
|
||||
+ NormInstance()
|
||||
+ NormInstance(priorityBoost:bool)
|
||||
- CreateInstance(priorityBoost:bool) : void
|
||||
+ DestroyInstance() : void
|
||||
+ StopInstance() : void
|
||||
+ RestartInstance() : bool
|
||||
+ SuspendInstance() : bool
|
||||
+ ResumeInstance() : void
|
||||
+ SetCacheDirectory(cachePath:string) : void
|
||||
+ OpenDebugLog(filename:string) : void
|
||||
+ CloseDebugLog() : void
|
||||
+ OpenDebugPipe(pipename:string) : void
|
||||
+ DebugLevel: int <<get>> <<set>>
|
||||
+ HasNextEvent(sec:int, usec:int) : boolean
|
||||
+ GetNextEvent() : NormEvent
|
||||
+ CreateSession(address:string, port:int, localNodeId:long) : NormSession
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
@startuml
|
||||
class NormNode {
|
||||
+ <<const>> NORM_NODE_ANY : long = 0xffffffff
|
||||
- _handle : long
|
||||
~ NormNode(handle:long)
|
||||
+ SetUnicastNack(state:bool) : void
|
||||
+ SetNackingMode(nackingMode:NormNackingMode) : void
|
||||
+ SetRepairBoundary(repairBoundary:NormRepairBoundary) : void
|
||||
+ SetRxRobustFactor(robustFactor:int) : void
|
||||
+ Id : long <<get>>
|
||||
+ Address : SocketAddress <<get>>
|
||||
+ Grtt : double <<get>>
|
||||
+ GetCommand(buffer:byte[], offset:int, length:int) : int
|
||||
+ FreeBuffers() : void
|
||||
+ Retain() : void
|
||||
+ Release(): void
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
@startuml
|
||||
class NormObject {
|
||||
# _handle:long
|
||||
~ NormObject(handle:long)
|
||||
+ SetNackingMode(nackingMode:NormNackingMode) : void
|
||||
+ Type : NormObjectType <<get>>
|
||||
+ Info : byte[] <<get>>
|
||||
+ Size : long <<get>>
|
||||
+ GetBytesPending() : long
|
||||
+ Cancel() : void
|
||||
+ Retain() : void
|
||||
+ Release() : void
|
||||
+ Sender : NormNode <<get>>
|
||||
+ <<override>> GetHashCode() : int
|
||||
+ <<override>> Equals(obj:object) : bool
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
@startuml
|
||||
class NormSession {
|
||||
{static} -_normSessions : Dictionary<long, NormSession>
|
||||
- _handle : long
|
||||
~ NormSession(handle:long)
|
||||
{static} ~ NormSession GetSession(handle:long)
|
||||
+ DestroySession() : void
|
||||
- DestroySessionNative() : void
|
||||
+ LocalNodeId: long <<get>>
|
||||
+ SetTxPort(port:int) : void
|
||||
+ SetTxPort(port:int, enableReuse:bool, txAddress:string) : void
|
||||
+ SetRxPortReuse(enable:bool) : void
|
||||
+ SetRxPortReuse(enable:bool, rxBindAddress:string, senderAddress:string, senderPort:int) : void
|
||||
+ SetEcnSupport(ecnEnable:bool, ignoreLoss:bool) : void
|
||||
+ SetEcnSupport(ecnEnable:bool, ignoreLoss:bool, tolerateLoss:bool) : void
|
||||
+ SetMulticastInterface(interfaceName:string) : void
|
||||
+ SetSSM(sourceAddr:string) : void
|
||||
+ SetTTL(ttl:byte) : void
|
||||
+ SetTOS(tos:byte) : void
|
||||
+ SetLoopback(loopbackEnable:bool) : void
|
||||
+ SetMessageTrace(flag:bool) : void
|
||||
+ SetTxLoss(precent:double) : void
|
||||
+ SetRxLoss(precent:double) : void
|
||||
+ ReportInterval: double <<get>> <<set>>
|
||||
+ StartSender(sessionId:int, bufferSpace:long, segmentSize:int, blockSize:short, numParity:short) : void
|
||||
+ StartSender(sessionId:int, bufferSpace:long, segmentSize:int, blockSize:short, numParity:short, fecId:NormFecType) : void
|
||||
+ StopSender() : void
|
||||
+ SetTxOnly(txOnly:bool) : void
|
||||
+ TxRate:double <<get>> <<set>>
|
||||
+ SetFlowControl(flowControlFactor:double) : void
|
||||
+ SetTxSocketBuffer(bufferSize:long) : void
|
||||
+ SetCongestionControl(enable:bool) : void
|
||||
+ SetCongestionControl(enable:bool, adjustRate:bool) : void
|
||||
+ SetTxRateBounds(rateMin:double, rateMax:double) : void
|
||||
+ SetTxCacheBounds(sizeMax:long, countMin:long, countMax:long) : void
|
||||
+ SetAutoParity(autoParity:short) : void
|
||||
+ GrttEstimate:double <<get>> <<set>>
|
||||
+ SetGrttMax(grttMax:double) : void
|
||||
+ SetGrttProbingMode(probingMode:NormProbingMode) : void
|
||||
+ SetGrttProbingInterval(intervalMin:double, intervalMax:double) : void
|
||||
+ SetBackoffFactor(backoffFactor:double) : void
|
||||
+ SetGroupSize(groupSize:long) : void
|
||||
+ SetTxRobustFactor(robustFactor:int) : void
|
||||
+ FileEnqueue(filename:string) : NormFile
|
||||
+ FileEnqueue(filename:string, info:byte[], infoOffset:int, infoLength:int) : NormFile
|
||||
+ DataEnqueue(dataBuffer:MemoryStream, dataOffset:int, dataLength:int) : NormData
|
||||
+ DataEnqueue(dataBuffer:MemoryStream, dataOffset:int, dataLength:int, info:byte[], infoOffset:int, infoLength:int) : NormData
|
||||
+ RequeueObject(object:NormObject) : void
|
||||
+ StreamOpen(bufferSize:long) : NormStream
|
||||
+ StreamOpen(bufferSize:long, info:byte[], infoOffset:int, infoLength:int) : NormStream
|
||||
+ SetWatermark(object:NormObject, overrideFlush:bool) : void
|
||||
+ CancelWatermark() : void
|
||||
+ ResetWatermark() : void
|
||||
+ AddAckingNode(nodeId:long) : void
|
||||
+ RemoveAckingNode(nodeId:long) : void
|
||||
+ GetAckingStatus(nodeId:long): NormAckingStatus
|
||||
+ SendCommand(cmdBuffer:byte[], cmdOffset:int, cmdLength:int, robust:bool) : void
|
||||
+ CancelCommand() : void
|
||||
+ StartReceiver(bufferSpace:long) : void
|
||||
+ StopReceiver() : void
|
||||
+ SetRxCacheLimit(countMax:int) : void
|
||||
+ SetRxSocketBuffer(bufferSize:long) : void
|
||||
+ SetSilentReceiver(silent:bool, maxDelay:int) : void
|
||||
+ SetDefaultUnicastNack(enabled:bool) : void
|
||||
+ SetDefaultSyncPolicy(syncPolicy:NormSyncPolicy) : void
|
||||
+ SetDefaultNackingMode(nackingMode: NormNackingMode) : void
|
||||
+ SetDefaultRepairBoundary(repairBoundary: NormRepairBoundry) : void
|
||||
+ SetDefaultRxRobustFactor(robustFactor: int): void
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
@startuml
|
||||
class NormStream {
|
||||
~ NormStream(handle:long)
|
||||
+ Close() : void
|
||||
+ Close(boolean graceful) : void
|
||||
+ Write(buffer:byte[], offset:int, length:int) : int
|
||||
+ Flush() : void
|
||||
+ Flush(eom:bool, flushMode:NormFlushMode) : void
|
||||
+ SetAutoFlush(flushMode:NormFlushMode) : void
|
||||
+ SetPushEnable(pushEnable:bool) : void
|
||||
+ HasVacancy : bool <<get>>
|
||||
+ MarkEom() : void
|
||||
+ Read(buffer:byte[], offset:int, length:int) : int
|
||||
+ SeekMsgStart() : bool
|
||||
+ ReadOffset : long <<get>>
|
||||
}
|
||||
@enduml
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
@startuml NormFileSend
|
||||
Client -> NormInstance : new()
|
||||
NormInstance -> NormInstance : CreateInstance(false)
|
||||
NormInstance -> NormApi : NormCreateInstance(false)
|
||||
NormInstance <- NormApi : instanceHandle
|
||||
Client <- NormInstance : NormInstance
|
||||
Client -> NormInstance : CreateSession(address, port, localNodeId)
|
||||
NormInstance -> NormApi : NormCreateSession(instanceHandle, address, port, localNodeId)
|
||||
NormInstance <- NormApi : sessionHandle
|
||||
alt sessionHandle == NORM_SESSION_INVALID
|
||||
NormInstance -> IOException : throw new("Failed to create session")
|
||||
end
|
||||
NormInstance -> NormSession : new(sessionHandle)
|
||||
NormInstance <- NormSession : NormSession
|
||||
Client <- NormInstance : NormSession
|
||||
Client -> NormSession : StartSender(sessionId, bufferSpace, segmentSize, blockSize, numParity, fecId)
|
||||
NormSession -> NormApi : NormStartSender(sessionHandle, sessionId, bufferSpace, segmentSize, blockSize, numParity, fecId)
|
||||
NormSession <- NormApi : success
|
||||
alt success == false
|
||||
NormSession -> IOException : throw new("Failed to start sender")
|
||||
end
|
||||
Client -> NormSession : FileEnqueue(filename)
|
||||
NormSession -> ASCII : GetBytes(filename)
|
||||
NormSession <- ASCII : info
|
||||
NormSession -> NormApi : NormFileEnqueue(sessionHandle, filename, info, info.Length)
|
||||
NormSession <- NormApi : objectHandle
|
||||
alt objectHandle == NormApi.NORM_OBJECT_INVALID
|
||||
NormSession -> IOException : throw new("Failed to enqueue file")
|
||||
end
|
||||
NormSession -> NormFile: new(objectHandle)
|
||||
NormSession <- NormFile : NormFile
|
||||
Client <- NormSession : NormFile
|
||||
loop NormEvent != null
|
||||
Client -> NormInstance : GetNextEvent()
|
||||
NormInstance -> NormApi : NormGetNextEvent(instanceHandle, NormEvent)
|
||||
NormInstance <- NormApi : success
|
||||
alt success == false
|
||||
Client <- NormInstance : null
|
||||
end
|
||||
Client <- NormInstance : NormEvent
|
||||
end
|
||||
Client -> NormSession : StopSender();
|
||||
NormSession -> NormApi : NormStopSender(sessionHandle)
|
||||
Client -> NormSession : DestroySession()
|
||||
NormSession -> NormSession : DestroySessionNative()
|
||||
NormSession -> NormApi : NormDestroySession(sessionHandle)
|
||||
Client -> NormInstance : DestroyInstance()
|
||||
NormInstance -> NormApi : NormDestroyInstance(instanceHandle)
|
||||
@enduml
|
||||
Loading…
Reference in New Issue