C# Class csImb.csImb

Inheritance: Caliburn.Micro.PropertyChangedBase
显示文件 Open project: TNOCS/csTouch Class Usage Examples

Public Properties

Property Type Description
Variables string>.Dictionary

Private Properties

Property Type Description
Commands_OnNormalEvent void
CsImbClientAdded void
DeleteGroup void
Event2Object object
ImbOnOnDisconnect void
Imb_OnStatusUpdate void
Imb_OnVariable void
Media_OnBuffer void
Media_OnNormalEvent void
OnClientAdded void
OnClientChanged void
OnClientRemoved void
OnImbBuffer void
OnIncomingEventBuffer void
OnIncomingEventObject void
ParseClient void
Positions_OnNormalEvent void
ProcessImbVariableGroup void

Public Methods

Method Description
CanDeleteGroup ( csGroup group ) : bool

Only the owner can delete a group.

Close ( ) : void
CreateGroupAndJoin ( csGroup group ) : void
FindClient ( long id ) : ImbClientStatus
ImbClientHandleToName ( long pImbHandle ) : string
Init ( string host, int port, string name, int id, string federation ) : void
Init ( string host, int port, string name, int id, string federation, ImbClientStatus clientStatus, string alternativeHost, int alternativePort ) : void
Init ( string host, int port, string name, int id, string federation, string alternativeHost, int alternativePort ) : void
JoinGroup ( csGroup ng ) : void
LeaveGroup ( csGroup g, bool pRemoveActiveGroup = true ) : void
Publish ( string channelName, XmlSerializer pSerializer ) : void

Specify that publishing on the specified event will start. The specified serializer will be used to convert the specified object into the IMB byte buffer.

PublishBuffer ( string channelName, object objectToPublish ) : void

Publishes the object on the channel.

SendCommand ( int id, string name, string data ) : void
SendCommand ( long id, string name ) : void
SendElementImage ( ImbClientStatus client, FrameworkElement element ) : void
SendImage ( ImbClientStatus client, System.Windows.Media.Imaging.BitmapSource image ) : void
SendImage ( ImbClientStatus client, string file ) : void
SendImage ( int screenId, string file ) : void
SendMessage ( string channel, string message ) : void
SetAction ( string action ) : void
SetScreenId ( int screenId ) : void
StopStream ( System.Guid id ) : void
Subscribe ( string channelName, XmlSerializer serializer, OnImbMessageReceived callback ) : void

Subscribes on updates on the specified event. The specified serializer will be used to convert the incoming IMB byte buffer into an actual object.

TriggerCommand ( string name, string data ) : void
TriggerMediaReceived ( Media m ) : void
TriggerMediaReceived ( string url, int sender ) : void
Unsubscribe ( string channelName ) : void

Unsubscribes from updates on the specified event.

UpdateStatus ( ) : void
csImb ( ) : System

Private Methods

Method Description
Commands_OnNormalEvent ( TEventEntry aEvent, TByteBuffer aPayload ) : void
CsImbClientAdded ( object sender, ImbClientStatus e ) : void
DeleteGroup ( csGroup group ) : void
Event2Object ( string channelName, byte buffer ) : object

Convert a byte buffer to an object instance depending on event name.

ImbOnOnDisconnect ( TConnection aConnection ) : void
Imb_OnStatusUpdate ( TConnection aConnection, string aModelUniqueClientID, string aModelName, int aProgress, int aStatus ) : void
Imb_OnVariable ( TConnection aConnection, string aVarName, byte aVarValue, byte aPrevValue ) : void
Media_OnBuffer ( TEventEntry aEvent, int aTick, int aBufferID, TByteBuffer aBuffer ) : void
Media_OnNormalEvent ( TEventEntry aEvent, TByteBuffer aPayload ) : void
OnClientAdded ( ImbClientStatus st ) : void
OnClientChanged ( ImbClientStatus st ) : void
OnClientRemoved ( int id ) : void
OnImbBuffer ( string channelName, byte buffer ) : void

Called when an imb data buffer has been received.

OnIncomingEventBuffer ( string channelName, byte buffer ) : void
OnIncomingEventObject ( string channelName, object rxObject ) : void
ParseClient ( string aVarName, string value ) : void
Positions_OnNormalEvent ( TEventEntry aEvent, TByteBuffer aPayload ) : void
ProcessImbVariableGroup ( string aVarName, string value ) : void

Method Details

CanDeleteGroup() public method

Only the owner can delete a group.
public CanDeleteGroup ( csGroup group ) : bool
group csGroup
return bool

Close() public method

public Close ( ) : void
return void

CreateGroupAndJoin() public method

public CreateGroupAndJoin ( csGroup group ) : void
group csGroup
return void

FindClient() public method

public FindClient ( long id ) : ImbClientStatus
id long
return ImbClientStatus

ImbClientHandleToName() public method

public ImbClientHandleToName ( long pImbHandle ) : string
pImbHandle long
return string

Init() public method

public Init ( string host, int port, string name, int id, string federation ) : void
host string
port int
name string
id int
federation string
return void

Init() public method

public Init ( string host, int port, string name, int id, string federation, ImbClientStatus clientStatus, string alternativeHost, int alternativePort ) : void
host string
port int
name string
id int
federation string
clientStatus ImbClientStatus
alternativeHost string
alternativePort int
return void

Init() public method

public Init ( string host, int port, string name, int id, string federation, string alternativeHost, int alternativePort ) : void
host string
port int
name string
id int
federation string
alternativeHost string
alternativePort int
return void

JoinGroup() public method

public JoinGroup ( csGroup ng ) : void
ng csGroup
return void

LeaveGroup() public method

public LeaveGroup ( csGroup g, bool pRemoveActiveGroup = true ) : void
g csGroup
pRemoveActiveGroup bool
return void

Publish() public method

Specify that publishing on the specified event will start. The specified serializer will be used to convert the specified object into the IMB byte buffer.
public Publish ( string channelName, XmlSerializer pSerializer ) : void
channelName string The name of the event.
pSerializer System.Xml.Serialization.XmlSerializer The serializer to apply in case the specfied event message is sent.
return void

PublishBuffer() public method

Publishes the object on the channel.
public PublishBuffer ( string channelName, object objectToPublish ) : void
channelName string The name of the channel.
objectToPublish object The object to publish.
return void

SendCommand() public method

public SendCommand ( int id, string name, string data ) : void
id int
name string
data string
return void

SendCommand() public method

public SendCommand ( long id, string name ) : void
id long
name string
return void

SendElementImage() public method

public SendElementImage ( ImbClientStatus client, FrameworkElement element ) : void
client ImbClientStatus
element System.Windows.FrameworkElement
return void

SendImage() public method

public SendImage ( ImbClientStatus client, System.Windows.Media.Imaging.BitmapSource image ) : void
client ImbClientStatus
image System.Windows.Media.Imaging.BitmapSource
return void

SendImage() public method

public SendImage ( ImbClientStatus client, string file ) : void
client ImbClientStatus
file string
return void

SendImage() public method

public SendImage ( int screenId, string file ) : void
screenId int
file string
return void

SendMessage() public method

public SendMessage ( string channel, string message ) : void
channel string
message string
return void

SetAction() public method

public SetAction ( string action ) : void
action string
return void

SetScreenId() public method

public SetScreenId ( int screenId ) : void
screenId int
return void

StopStream() public method

public StopStream ( System.Guid id ) : void
id System.Guid
return void

Subscribe() public method

Subscribes on updates on the specified event. The specified serializer will be used to convert the incoming IMB byte buffer into an actual object.
public Subscribe ( string channelName, XmlSerializer serializer, OnImbMessageReceived callback ) : void
channelName string The name of the channel.
serializer System.Xml.Serialization.XmlSerializer The serializer to apply in case the specfied event message is received.
callback OnImbMessageReceived The callback.
return void

TriggerCommand() public method

public TriggerCommand ( string name, string data ) : void
name string
data string
return void

TriggerMediaReceived() public method

public TriggerMediaReceived ( Media m ) : void
m Media
return void

TriggerMediaReceived() public method

public TriggerMediaReceived ( string url, int sender ) : void
url string
sender int
return void

Unsubscribe() public method

Unsubscribes from updates on the specified event.
public Unsubscribe ( string channelName ) : void
channelName string The name of the channel.
return void

UpdateStatus() public method

public UpdateStatus ( ) : void
return void

csImb() public method

public csImb ( ) : System
return System

Property Details

Variables public_oe property

public Dictionary Variables
return string>.Dictionary