diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormAckingStatus.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormAckingStatus.puml new file mode 100644 index 0000000..f31c80e --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormAckingStatus.puml @@ -0,0 +1,8 @@ +@startuml +enum NormAckingStatus { + NORM_ACK_INVALID + NORM_ACK_FAILURE + NORM_ACK_PENDING + NORM_ACK_SUCCESS +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormEventType.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormEventType.puml new file mode 100644 index 0000000..71dd8fb --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormEventType.puml @@ -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 \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFecType.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFecType.puml new file mode 100644 index 0000000..4b55669 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFecType.puml @@ -0,0 +1,7 @@ +@startuml +enum NormFecType { + RS + RS8 + SB +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFlushMode.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFlushMode.puml new file mode 100644 index 0000000..63f7b1a --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormFlushMode.puml @@ -0,0 +1,7 @@ +@startuml +enum NormFlushMode { + NORM_FLUSH_NONE + NORM_FLUSH_PASSIVE + NORM_FLUSH_ACTIVE +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormNackingMode.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormNackingMode.puml new file mode 100644 index 0000000..41f021a --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormNackingMode.puml @@ -0,0 +1,7 @@ +@startuml +enum NormNackingMode { + ORM_NACK_NONE + NORM_NACK_INFO_ONLY + NORM_NACK_NORMAL +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormObjectType.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormObjectType.puml new file mode 100644 index 0000000..00e2dd8 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormObjectType.puml @@ -0,0 +1,8 @@ +@startuml +enum NormObjectType { + NORM_OBJECT_NONE + NORM_OBJECT_DATA + NORM_OBJECT_FILE + NORM_OBJECT_STREAM +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormProbingMode.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormProbingMode.puml new file mode 100644 index 0000000..004ada7 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormProbingMode.puml @@ -0,0 +1,7 @@ +@startuml +enum NormProbingMode { + NORM_PROBE_NONE + NORM_PROBE_PASSIVE + NORM_PROBE_ACTIVE +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormRepairBoundary.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormRepairBoundary.puml new file mode 100644 index 0000000..b97df40 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormRepairBoundary.puml @@ -0,0 +1,6 @@ +@startuml +enum NormRepairBoundary { + NORM_BOUNDARY_BLOCK + NORM_BOUNDARY_OBJECT +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormSyncPolicy.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormSyncPolicy.puml new file mode 100644 index 0000000..3bb1cf5 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormSyncPolicy.puml @@ -0,0 +1,7 @@ +@startuml +enum NormSyncPolicy { + NORM_SYNC_CURRENT + NORM_SYNC_STREAM + NORM_SYNC_ALL +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormTrackingStatus.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormTrackingStatus.puml new file mode 100644 index 0000000..048d1e4 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/Enums/NormTrackingStatus.puml @@ -0,0 +1,9 @@ +@startuml +enum NormTrackingStatus +{ + NORM_TRACK_NONE + NORM_TRACK_RECEIVERS + NORM_TRACK_SENDERS + NORM_TRACK_ALL +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/INormEventListener.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/INormEventListener.puml new file mode 100644 index 0000000..ba923b3 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/INormEventListener.puml @@ -0,0 +1,5 @@ +@startuml +interface INormEventListener { + NormEventOccurred(normEvent:NormEvent) : void +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormInputStream.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormInputStream.puml new file mode 100644 index 0000000..dc3434d --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormInputStream.puml @@ -0,0 +1,33 @@ +@startuml +class NormInputStream { + - _normInstance : NormInstance + - _normSession : NormSession + - _normStream : NormStream + - _normEventListeners : List + - _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 + + <> Dispose() : void + + IsClosed : bool <> + + Read() : int + + <> Read(buffer:byte[], offset:int, length:int) : int + - ProcessEvent() : void +} +Stream <|-- NormInputStream +@enduml diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormOutputStream.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormOutputStream.puml new file mode 100644 index 0000000..9dffa7b --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/NormOutputStream.puml @@ -0,0 +1,40 @@ +@startuml +class NormOutputStream { + - _normInstance : NormInstance + - _normSession : NormSession + - _normStream : NormStream + - _normEventListeners : List + - _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 <> <> + + GrttEstimate:double <> <> + + 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 + + <> Dispose() : void + + IsClosed : bool <> + + Write(b:int) : void + + <> Write(buffer:byte[], offset:int, count:int) + - ProcessEvent() : void +} +Stream <|-- NormOutputStream +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/StreamBreakException.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/StreamBreakException.puml new file mode 100644 index 0000000..6ae4008 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/IO/StreamBreakException.puml @@ -0,0 +1,6 @@ +@startuml +class StreamBreakException { + + StreamBreakException(message:string) +} +IOException <|-- StreamBreakException +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormApi.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormApi.puml new file mode 100644 index 0000000..d6ac267 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormApi.puml @@ -0,0 +1,176 @@ +@startuml +class NormApi +{ + + <> NORM_OBJECT_INVALID : int = 0 + + <> FILENAME_MAX : int = 260 + + <> 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 \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormData.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormData.puml new file mode 100644 index 0000000..658ec09 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormData.puml @@ -0,0 +1,7 @@ +@startuml +class NormData { + ~ NormData(handle:long) + + byte[] Data <> +} +NormObject <|-- NormData +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormEvent.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormEvent.puml new file mode 100644 index 0000000..3a1a991 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormEvent.puml @@ -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 <> + + Session : NormSession <> + + Node : NormNode <> + + Object : NormObject <> + + <> ToString() : string +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormFile.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormFile.puml new file mode 100644 index 0000000..49e3c20 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormFile.puml @@ -0,0 +1,8 @@ +@startuml +class NormFile { + ~ NormFile(handle:long) + + Name : string <> + + Rename(filename:string) : void +} +NormObject <|-- NormFile +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormInstance.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormInstance.puml new file mode 100644 index 0000000..7aa9e8b --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormInstance.puml @@ -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 <> <> + + HasNextEvent(sec:int, usec:int) : boolean + + GetNextEvent() : NormEvent + + CreateSession(address:string, port:int, localNodeId:long) : NormSession +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormNode.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormNode.puml new file mode 100644 index 0000000..d9757b9 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormNode.puml @@ -0,0 +1,18 @@ +@startuml +class NormNode { + + <> 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 <> + + Address : SocketAddress <> + + Grtt : double <> + + GetCommand(buffer:byte[], offset:int, length:int) : int + + FreeBuffers() : void + + Retain() : void + + Release(): void +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormObject.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormObject.puml new file mode 100644 index 0000000..2a48d17 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormObject.puml @@ -0,0 +1,17 @@ +@startuml +class NormObject { + # _handle:long + ~ NormObject(handle:long) + + SetNackingMode(nackingMode:NormNackingMode) : void + + Type : NormObjectType <> + + Info : byte[] <> + + Size : long <> + + GetBytesPending() : long + + Cancel() : void + + Retain() : void + + Release() : void + + Sender : NormNode <> + + <> GetHashCode() : int + + <> Equals(obj:object) : bool +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormSession.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormSession.puml new file mode 100644 index 0000000..e1fd064 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormSession.puml @@ -0,0 +1,70 @@ +@startuml +class NormSession { + {static} -_normSessions : Dictionary + - _handle : long + ~ NormSession(handle:long) + {static} ~ NormSession GetSession(handle:long) + + DestroySession() : void + - DestroySessionNative() : void + + LocalNodeId: long <> + + 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 <> <> + + 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 <> <> + + 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 <> <> + + 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 \ No newline at end of file diff --git a/src/dotnet/design/Mil/Navy/Nrl/Norm/NormStream.puml b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormStream.puml new file mode 100644 index 0000000..e4c1831 --- /dev/null +++ b/src/dotnet/design/Mil/Navy/Nrl/Norm/NormStream.puml @@ -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 <> + + MarkEom() : void + + Read(buffer:byte[], offset:int, length:int) : int + + SeekMsgStart() : bool + + ReadOffset : long <> +} +@enduml \ No newline at end of file diff --git a/src/dotnet/design/SequenceDiagrams/NormFileSend.puml b/src/dotnet/design/SequenceDiagrams/NormFileSend.puml new file mode 100644 index 0000000..8f1e763 --- /dev/null +++ b/src/dotnet/design/SequenceDiagrams/NormFileSend.puml @@ -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 \ No newline at end of file