Class FamosFile
Represents an imc FAMOS file in a hierachical structure containing texts, single values, channels and more. It is capable of reading file data.
Implements
Inherited Members
Namespace: ImcFamosFile
Assembly: ImcFamosFile.dll
Syntax
public class FamosFile : FamosFileHeader, IDisposable
Methods
| Improve this Doc View SourceClose()
Closes the file stream. Has the same effect as Dispose().
Declaration
public void Close()
Dispose()
Declaration
public void Dispose()
Edit(Action<BinaryWriter>)
Writes the provided data to the currently opened file. Use this only in conjunction with OpenEditable(String) and without modification of the returned FamosFile instance to ensure proper buffer alignment.
Declaration
public void Edit(Action<BinaryWriter> writeData)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.BinaryWriter> | writeData |
Open(Stream)
Opens and reads the provided stream
.
Declaration
public static FamosFile Open(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream containing the serialized FAMOS data. |
Returns
Type | Description |
---|---|
FamosFile | Returns a new FamosFile instance. |
Open(String)
Opens the file at the location specified by the parameter filePath
in read-only mode.
Declaration
public static FamosFile Open(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The path to the file to be opened. |
Returns
Type | Description |
---|---|
FamosFile | Returns a new FamosFile instance. |
OpenEditable(String)
Opens the file at the location specified by the parameter filePath
. Use this method in conjunction with Edit(Action<BinaryWriter>) to edit the file's raw data without touching the header itself.
Declaration
public static FamosFile OpenEditable(string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The path to the file to be opened. |
Returns
Type | Description |
---|---|
FamosFile | Returns a new FamosFile instance. |
ReadAll()
Reads the full length datasets of all channels in the file.
Declaration
public List<FamosFileChannelData> ReadAll()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<FamosFileChannelData> | Returns a FamosFileChannelData for each channel. |
ReadGroup(List<FamosFileChannel>)
Reads the full length datasets of all provided channels.
Declaration
public List<FamosFileChannelData> ReadGroup(List<FamosFileChannel> channels)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<FamosFileChannel> | channels | The list of channels that the descibe the data to read |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<FamosFileChannelData> | Returns a FamosFileChannelData for each channel. |
ReadSingle(FamosFileChannel)
Reads the full length dataset associated to the provided channel
.
Declaration
public FamosFileChannelData ReadSingle(FamosFileChannel channel)
Parameters
Type | Name | Description |
---|---|---|
FamosFileChannel | channel | The channel that describes the data to read. |
Returns
Type | Description |
---|---|
FamosFileChannelData | Returns a FamosFileChannelData instance, which may consists of more than one dataset. |
ReadSingle(FamosFileChannel, Int32)
Reads a partial dataset associated to the provided channel
.
Declaration
public FamosFileChannelData ReadSingle(FamosFileChannel channel, int start)
Parameters
Type | Name | Description |
---|---|---|
FamosFileChannel | channel | The channel that describes the data to read. |
System.Int32 | start | The reading start offset. |
Returns
Type | Description |
---|---|
FamosFileChannelData | Returns a FamosFileChannelData instance, which may consists of more than one dataset. |
ReadSingle(FamosFileChannel, Int32, Int32)
Reads a partial dataset associated to the provided channel
.
Declaration
public FamosFileChannelData ReadSingle(FamosFileChannel channel, int start, int length)
Parameters
Type | Name | Description |
---|---|---|
FamosFileChannel | channel | The channel that describes the data to read. |
System.Int32 | start | The reading start offset. |
System.Int32 | length | The number of the values to read. |
Returns
Type | Description |
---|---|
FamosFileChannelData | Returns a FamosFileChannelData instance, which may consists of more than one dataset. |