public class WhistleBinaryDataSource extends BinaryDataSource
Modifier and Type | Field and Description |
---|---|
static int |
WHISTLE_MOAN_DETECTION |
Constructor and Description |
---|
WhistleBinaryDataSource(WhistleToneConnectProcess wmDetector,
PamDataBlock sisterDataBlock,
java.lang.String streamName) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getModuleHeaderData() |
int |
getModuleVersion()
Get a version number for the module.
|
PackedBinaryObject |
getPackedData(PamDataUnit pamDataUnit)
Get packed binary data for either sending to file or over the network
|
java.lang.String |
getStreamName() |
int |
getStreamVersion() |
void |
newFileOpened(java.io.File outputFile)
Called from the BinaryOutputStream whenever a new output
file is opened.
|
PamDataUnit |
sinkData(BinaryObjectData binaryObjectData,
BinaryHeader bh,
int moduleVersion)
Convert data read back in in viewer mode into the correct
type of PamDataUnit.
|
ModuleFooter |
sinkModuleFooter(BinaryObjectData binaryObjectData,
BinaryHeader bh,
ModuleHeader moduleHeader)
Do something with module footer information
|
ModuleHeader |
sinkModuleHeader(BinaryObjectData binaryObjectData,
BinaryHeader bh)
Do something with module header information
|
getBinaryStorageStream, getModuleFooterData, getModuleName, getModuleType, getSisterDataBlock, getSpecialDrawing, isDoBinaryStore, isStoreData, reset, saveData, setBinaryStorageStream, setDoBinaryStore, setStoreData, storeData
public static final int WHISTLE_MOAN_DETECTION
public WhistleBinaryDataSource(WhistleToneConnectProcess wmDetector, PamDataBlock sisterDataBlock, java.lang.String streamName)
public PackedBinaryObject getPackedData(PamDataUnit pamDataUnit)
BinaryDataSource
getPackedData
in class BinaryDataSource
pamDataUnit
- data unit to packpublic java.lang.String getStreamName()
getStreamName
in class BinaryDataSource
public int getStreamVersion()
getStreamVersion
in class BinaryDataSource
public PamDataUnit sinkData(BinaryObjectData binaryObjectData, BinaryHeader bh, int moduleVersion)
BinaryDataSource
DO NOT add this unit directly to the datablock, but pass it back to the calling process which will add it to the datablock if necessary.
sinkData
in class BinaryDataSource
binaryObjectData
- Binary data read back from a file.bh
- binary header from start of file.public int getModuleVersion()
BinaryDataSource
This is different to the version number in the main file header and allows individual modules to update their format and maintain backwards compatibility with old data
getModuleVersion
in class BinaryDataSource
public byte[] getModuleHeaderData()
getModuleHeaderData
in class BinaryDataSource
public ModuleFooter sinkModuleFooter(BinaryObjectData binaryObjectData, BinaryHeader bh, ModuleHeader moduleHeader)
BinaryDataSource
sinkModuleFooter
in class BinaryDataSource
binaryObjectData
- data for the module header.bh
- Binary header informationpublic ModuleHeader sinkModuleHeader(BinaryObjectData binaryObjectData, BinaryHeader bh)
BinaryDataSource
sinkModuleHeader
in class BinaryDataSource
binaryObjectData
- data for the module header.bh
- Binary header informationpublic void newFileOpened(java.io.File outputFile)
BinaryDataSource
newFileOpened
in class BinaryDataSource
outputFile
- file information.