C# 클래스 Lawo.EmberPlusSharp.Ember.EmberWriter

Represents a writer that provides the means to generate BER-encoded output, as specified in "X.690"X.690.
Only the subset defined in the "Ember+ Specification"Ember+ Specification is supported.
상속: IDisposable
파일 보기 프로젝트 열기: Lawo/ember-plus-sharp 1 사용 예제들

공개 메소드들

메소드 설명
EmberWriter ( Stream stream ) : System

Initializes a new instance of the EmberWriter class by calling EmberWriter(Stream, int)">EmberWriter(

EmberWriter ( Stream stream, int bufferSize ) : System

Initializes a new instance of the EmberWriter class.

Flush ( ) : void

Flushes the internal buffer into the stream passed to the constructor.

WriteEndContainer ( ) : void

Writes the end of the previous sequence, set or application-defined type.

WriteStartApplicationDefinedType ( EmberId outer, int innerNumber ) : void

Writes outer with indefinite length followed by the start of an application-defined type with indefinite length.

WriteStartSequence ( EmberId outer ) : void

Writes outer with indefinite length followed by the start of a sequence with indefinite length.

WriteStartSet ( EmberId outer ) : void

Writes outer with indefinite length followed by the start of a set with indefinite length.

WriteValue ( EmberId outer, bool value ) : void

Writes outer with definite length followed by value as Boolean.

WriteValue ( EmberId outer, byte value ) : void

Writes outer with definite length followed by value as Octetstring.

WriteValue ( EmberId outer, double value ) : void

Writes outer with definite length followed by value as Real.

WriteValue ( EmberId outer, int value ) : void

Writes outer with definite length followed by value as Relative object identifier.

WriteValue ( EmberId outer, long value ) : void

Writes outer with definite length followed by value as Integer.

WriteValue ( EmberId outer, string value ) : void

Writes outer with definite length followed by value as UTF8String.

비공개 메소드들

메소드 설명
AssertNotDisposed ( ) : void
Dispose ( ) : void
Get7BitStartShift ( int value ) : int
Get8BitStartShift ( long value, bool isSigned ) : int
GetLeadingOctet ( EmberId emberId, int bits ) : byte
GetLengthFromShift8Bit ( int shift ) : int
GetLengthLength ( int length, int &shift ) : int
Write7Bit ( WriteBuffer writeBuffer, long value, int shift ) : void
Write8Bit ( WriteBuffer writeBuffer, long value, int shift ) : void
WriteIdentifier ( WriteBuffer writeBuffer, EmberId emberId ) : void

See "X.690"X.690, chapter 8.1.2.

WriteIdentifiersAndLengths ( EmberId outer, EmberId inner, int innerLength ) : void
WriteLength ( WriteBuffer writeBuffer, int length, int shift, int lengthLength ) : void

See "X.690"X.690, chapter 8.1.3.

WriteReal ( WriteBuffer writeBuffer, double value ) : void

See "X.690"X.690, chapter 8.5 and IEEE Floating-Point Representation. Of course the assumption is that C# has the same floating point representation as C++ (pretty safe, as floating point calculations are done by the hardware).

메소드 상세

EmberWriter() 공개 메소드

Initializes a new instance of the EmberWriter class by calling EmberWriter(Stream, int)">EmberWriter(
public EmberWriter ( Stream stream ) : System
stream Stream
리턴 System

EmberWriter() 공개 메소드

Initializes a new instance of the EmberWriter class.
equals null. is 0 or negative.
public EmberWriter ( Stream stream, int bufferSize ) : System
stream Stream The stream to which the EmBER-encoded output should be written.
bufferSize int The size of the internal buffer in bytes.
리턴 System

Flush() 공개 메소드

Flushes the internal buffer into the stream passed to the constructor.
public Flush ( ) : void
리턴 void

WriteEndContainer() 공개 메소드

Writes the end of the previous sequence, set or application-defined type.
has been called.
public WriteEndContainer ( ) : void
리턴 void

WriteStartApplicationDefinedType() 공개 메소드

Writes outer with indefinite length followed by the start of an application-defined type with indefinite length.
is smaller than /// . has been called.
public WriteStartApplicationDefinedType ( EmberId outer, int innerNumber ) : void
outer EmberId
innerNumber int
리턴 void

WriteStartSequence() 공개 메소드

Writes outer with indefinite length followed by the start of a sequence with indefinite length.
has been called.
public WriteStartSequence ( EmberId outer ) : void
outer EmberId
리턴 void

WriteStartSet() 공개 메소드

Writes outer with indefinite length followed by the start of a set with indefinite length.
has been called.
public WriteStartSet ( EmberId outer ) : void
outer EmberId
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as Boolean.
has been called.
public WriteValue ( EmberId outer, bool value ) : void
outer EmberId
value bool
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as Octetstring.
has been called.
public WriteValue ( EmberId outer, byte value ) : void
outer EmberId
value byte
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as Real.
This method is called on a big endian CPU, which is currently not /// supported. has been called.
public WriteValue ( EmberId outer, double value ) : void
outer EmberId
value double
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as Relative object identifier.
equals null. has been called.
public WriteValue ( EmberId outer, int value ) : void
outer EmberId
value int
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as Integer.
has been called.
public WriteValue ( EmberId outer, long value ) : void
outer EmberId
value long
리턴 void

WriteValue() 공개 메소드

Writes outer with definite length followed by value as UTF8String.
equals null. has been called.
public WriteValue ( EmberId outer, string value ) : void
outer EmberId
value string
리턴 void