Show / Hide Table of Contents

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.

Inheritance
System.Object
FamosFileBase
FamosFileBaseExtended
FamosFileHeader
FamosFile
Implements
System.IDisposable
Inherited Members
FamosFileHeader.LanguageInfo
FamosFileHeader.OriginInfo
FamosFileHeader.Texts
FamosFileHeader.SingleValues
FamosFileHeader.Channels
FamosFileHeader.CustomKeys
FamosFileHeader.Groups
FamosFileHeader.Fields
FamosFileHeader.RawBlocks
FamosFileHeader.AlignBuffers(FamosFileRawBlock, FamosFileAlignmentMode)
FamosFileHeader.AlignBuffers(FamosFileRawBlock, FamosFileAlignmentMode, List<FamosFileComponent>)
FamosFileHeader.FindFieldAndComponent(FamosFileChannel)
FamosFileHeader.FindField(FamosFileChannel)
FamosFileHeader.FindComponent(FamosFileChannel)
FamosFileHeader.Validate()
FamosFileHeader.Save(String, Action<BinaryWriter>, Boolean)
FamosFileHeader.Save(String, FileMode, Action<BinaryWriter>, Boolean)
FamosFileHeader.Save(Stream, Action<BinaryWriter>, Boolean)
FamosFileHeader.WriteSingle<T>(BinaryWriter, FamosFileComponent, T[])
FamosFileHeader.WriteSingle<T>(BinaryWriter, FamosFileComponent, Span<T>)
FamosFileHeader.WriteSingle<T>(BinaryWriter, FamosFileComponent, Int32, T[])
FamosFileHeader.WriteSingle<T>(BinaryWriter, FamosFileComponent, Int32, Span<T>)
Namespace: ImcFamosFile
Assembly: ImcFamosFile.dll
Syntax
public class FamosFile : FamosFileHeader, IDisposable

Methods

| Improve this Doc View Source

Close()

Closes the file stream. Has the same effect as Dispose().

Declaration
public void Close()
| Improve this Doc View Source

Dispose()

Releases the resources used by FamosFile. Has the same effect as Close().

Declaration
public void Dispose()
| Improve this Doc View Source

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
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
Back to top Copyright © 2019 Vincent Wilms