UCD is a standard to allow transfering cargo between entities using docking. It is currently only a proposition based on a prototype, and thus needs some testing to confirm viability.
UCD will be based on USD for the dock itself, and as such this document will only illustrate how to transfer cargo given an already established dock.
Currently, the UCD standard specifies 6 item boxes and the requirements which the logic used to operate them must meet.
These 6 item boxes are hereby labeled as:
ChildSend and ParentTransfer are hooked up to the docking blocks.
The operating logic must fulfill the following requirements:
This will have the following effect:
Upon docking, ParentTransfer will be pulling items from both ParentSend, and the docked ChildSend. If ChildSend contains an item to send, it will be drained by ParentCounter once transferred, thus ParentTransfer continues to pull items.
Once ChildSend no longer contains items to send, it will be empty, causing it to pull items, while at the same time any item in ParentCount will be drained to ParentRecieve.
If ParentSend is not empty at this point, it will be emptied by ParentTransfer given enough time.
Once ParentSend and ParentCount are empty, ParentTransfer will no longer be pulling items, and thus allows ChildSend to pull the items the Child entity shall recieve through the dock.
Once pulled, they will be drained to ChildRecieve, freeing up ChildSend again.
This will continue until there are no more items to pull, at which point the transfer is complete.
There are 3 special cases:
Thoughts? Improvements?
Proof-of-concepts and a concrete simplified implementation are also welcome.
UCD will be based on USD for the dock itself, and as such this document will only illustrate how to transfer cargo given an already established dock.
Currently, the UCD standard specifies 6 item boxes and the requirements which the logic used to operate them must meet.
These 6 item boxes are hereby labeled as:
- ParentSend
- ParentTransfer
- ParentCounter
- ParentRecieve
- ChildSend
- ChildRecieve
ChildSend and ParentTransfer are hooked up to the docking blocks.
The operating logic must fulfill the following requirements:
- ChildRecieve shall permanently pull exactly all items that shall be recieved through the dock from ChildSend.
- ChildSend shall pull all items that shall be recieved through the dock from the dock, if ChildSend is empty, while the entity is docked.
- ChildSend MAY also pull items that shall be sent through the dock from other storages on the ship whenever ChildSend is pulling items.
- ParentRecieve shall permanently pull exactly all items from ParentCounter.
- ParentCounter shall permanently pull exactly all items that shall NOT be sent through the dock from ParentTransfer.
- ParentSend shall pull all items that would be sent through the dock from ParentTransfer, exactly if there is NO entity docked.
- ParentTransfer shall pull all items that shall be sent or recieved through the dock from the dock and ParentSend, exactly if {[(ParentSend is NOT empty) OR (ParentCounter is NOT empty)] AND (an entity is docked)} OR (an entity docked AFTER the last storage-pull-tick)
BoxName
Pulling-condition
Itemfilter-condition
Pulling-condition
Itemfilter-condition
This will have the following effect:
Upon docking, ParentTransfer will be pulling items from both ParentSend, and the docked ChildSend. If ChildSend contains an item to send, it will be drained by ParentCounter once transferred, thus ParentTransfer continues to pull items.
Once ChildSend no longer contains items to send, it will be empty, causing it to pull items, while at the same time any item in ParentCount will be drained to ParentRecieve.
If ParentSend is not empty at this point, it will be emptied by ParentTransfer given enough time.
Once ParentSend and ParentCount are empty, ParentTransfer will no longer be pulling items, and thus allows ChildSend to pull the items the Child entity shall recieve through the dock.
Once pulled, they will be drained to ChildRecieve, freeing up ChildSend again.
This will continue until there are no more items to pull, at which point the transfer is complete.
There are 3 special cases:
- The Child entity is trying to send items not accepted by the Parent entity.
In this case, the child unloading phase won't properly end. A manual override switch on the Child entity will alleviate that issue. (the switch will force ChildSend to pull items, thus forcefully ending the unloading phase) - The Parent entity is trying to send items not accepted by the Child entity.
In this case, residual items, that failed to be sent, will be left over in ParentTransfer. This however won't be an issue, as ParentSend will still be emptied, and drain the items back once the Child entity undocks. - The Parent entity has no items to send when the Child entity docks.
The last part of the rules for when ParentTransfer will pull items specifically handles this case. It effectively acts as an automatic override, forcing the item-reception phase to start on the Parent entity whenever the Child entity docks.
Thoughts? Improvements?
Proof-of-concepts and a concrete simplified implementation are also welcome.