Halyri  0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Halyri.Connection Class Reference

Makes all connection actions to server. User can connect, update information about device, personalinfo, medicalinfo or location. Uses SignalR for receiving and WCF for sending. More...

Public Member Functions

delegate void MediaConfigurationRequestUpdated (object sender, EventArgs e, MediaConfigurationDto config)
 
delegate void Connected ()
 
delegate void InProcess ()
 
delegate void Processed ()
 
delegate void OpenMapRequest ()
 
delegate void CloseMapRequest ()
 
delegate void TextMessageReceived (String message)
 
delegate void MeasurementStartRequestReceived (MeasurementInstrumentDto instrument)
 
delegate void MeasurementStopRequestReceived (MeasurementInstrumentDto instrument)
 
delegate void MeasurementInstrumentListRequestReceived ()
 
delegate void ConnectionFailed ()
 
 Connection ()
 
bool Connect (UpdateConnectionPriorityRequest priority)
 Connects signalR and wcf and stores guid. Updates personalinfo, location and device info. More...
 
void StartGpsTracking ()
 
void Disconnect ()
 Disconnects. More...
 
void Reconnect (UpdateConnectionPriorityRequest priority)
 Reconnects with given priority. More...
 
void UdpConnect ()
 
void UdpDisconnect ()
 
bool UdpMediaSend (MediaInformation mediaInfo, byte[] mediaData, int originalLength)
 
void UpdatePriority (UpdateConnectionPriorityRequest priority)
 Adds guid to priority and then updates priority async. More...
 
void UpdateLocation (LocationTypeDto type)
 Adds guid to location and then updates location async. More...
 
void UpdatePersonalInfo (UpdatePersonalInfoRequest personalInfo)
 Adds guid to personalinfo and then updates personalinfo async. More...
 
void UpdateDeviceInfo (UpdateDeviceInfoRequest deviceInfo)
 Adds guid to deviceinfo and then updates deviceinfo async. More...
 
void UpdateMedicalInfo (UpdateMedicalInfoRequest medicalInfo)
 Adds guid to medicalinfo and then updates medicalinfo async. More...
 
void SendMessage (String message)
 Makes new thread to send message to server so it won't block ui thread. More...
 
void SwitchNoSound (bool value)
 Switch nosound. More...
 
void UpdateLocationUserSpecified (System.Device.Location.GeoCoordinate coordinates)
 Updates Location with given goordinates as user specific type. More...
 
void sendMedia (MediaInformationDto info, byte[] data, object userState)
 Sends media packet over the WCF connection to the server. More...
 
void UpdateMeasurementInstrumentList (ObservableCollection< MeasurementInstrumentDto > instrumentList)
 Updates the provided list of measurement instruments to the server. More...
 
void UploadMeasurementInstrumentData (MeasurementInstrumentDto instrument, byte[] data)
 Uploads the provided instrument data from the specified instrument to the server. More...
 
void UpdateEmergencyType (string emergencyType)
 

Public Attributes

MediaConfigurationRequestUpdated MediaConfigurationUpdatedEvent
 
MediaSendFinishedDelegate MediaSendFinishedEvent
 
UdpMediaDataReceived UdpMediaDataReceivedEvent
 
MediaSocketHasFailed MediaSocketHasFailedEvent
 

Events

Connected ConnectedEvent
 
InProcess InProcessEvent
 
Processed ProcessedEvent
 
OpenMapRequest OpenMapRequestEvent
 
CloseMapRequest CloseMapRequestEvent
 
TextMessageReceived TextMessageReceivedEvent
 
MeasurementStartRequestReceived MeasurementStartRequestReceivedEvent
 
MeasurementStopRequestReceived MeasurementStopRequestReceivedEvent
 
MeasurementInstrumentListRequestReceived MeasurementInstrumentListRequestReceivedEvent
 
ConnectionFailed ConnectionFailedEvent
 

Detailed Description

Makes all connection actions to server. User can connect, update information about device, personalinfo, medicalinfo or location. Uses SignalR for receiving and WCF for sending.

Constructor & Destructor Documentation

Halyri.Connection.Connection ( )

Member Function Documentation

delegate void Halyri.Connection.CloseMapRequest ( )
bool Halyri.Connection.Connect ( UpdateConnectionPriorityRequest  priority)

Connects signalR and wcf and stores guid. Updates personalinfo, location and device info.

delegate void Halyri.Connection.Connected ( )
delegate void Halyri.Connection.ConnectionFailed ( )
void Halyri.Connection.Disconnect ( )

Disconnects.

delegate void Halyri.Connection.InProcess ( )
delegate void Halyri.Connection.MeasurementInstrumentListRequestReceived ( )
delegate void Halyri.Connection.MeasurementStartRequestReceived ( MeasurementInstrumentDto  instrument)
delegate void Halyri.Connection.MeasurementStopRequestReceived ( MeasurementInstrumentDto  instrument)
delegate void Halyri.Connection.MediaConfigurationRequestUpdated ( object  sender,
EventArgs  e,
MediaConfigurationDto  config 
)
delegate void Halyri.Connection.OpenMapRequest ( )
delegate void Halyri.Connection.Processed ( )
void Halyri.Connection.Reconnect ( UpdateConnectionPriorityRequest  priority)

Reconnects with given priority.

Parameters
priorityPriority
void Halyri.Connection.sendMedia ( MediaInformationDto  info,
byte[]  data,
object  userState 
)

Sends media packet over the WCF connection to the server.

Parameters
infoInformation describing the media
dataMedia data
userStateUser state object for tracking corresponding async operation completed event for this send call
void Halyri.Connection.SendMessage ( String  message)

Makes new thread to send message to server so it won't block ui thread.

Parameters
messageMessage
void Halyri.Connection.StartGpsTracking ( )
void Halyri.Connection.SwitchNoSound ( bool  value)

Switch nosound.

Parameters
valueValue to where to switch
delegate void Halyri.Connection.TextMessageReceived ( String  message)
void Halyri.Connection.UdpConnect ( )
void Halyri.Connection.UdpDisconnect ( )
bool Halyri.Connection.UdpMediaSend ( MediaInformation  mediaInfo,
byte[]  mediaData,
int  originalLength 
)
void Halyri.Connection.UpdateDeviceInfo ( UpdateDeviceInfoRequest  deviceInfo)

Adds guid to deviceinfo and then updates deviceinfo async.

Parameters
deviceInfoDeviceinfo to update
void Halyri.Connection.UpdateEmergencyType ( string  emergencyType)
void Halyri.Connection.UpdateLocation ( LocationTypeDto  type)

Adds guid to location and then updates location async.

Parameters
locationLocation to update
void Halyri.Connection.UpdateLocationUserSpecified ( System.Device.Location.GeoCoordinate  coordinates)

Updates Location with given goordinates as user specific type.

Parameters
coordinatesGoordinates
void Halyri.Connection.UpdateMeasurementInstrumentList ( ObservableCollection< MeasurementInstrumentDto instrumentList)

Updates the provided list of measurement instruments to the server.

Parameters
instrumentListList of available measurement instruments on the device
void Halyri.Connection.UpdateMedicalInfo ( UpdateMedicalInfoRequest  medicalInfo)

Adds guid to medicalinfo and then updates medicalinfo async.

Parameters
medicalInfoMedicalinfo to update
void Halyri.Connection.UpdatePersonalInfo ( UpdatePersonalInfoRequest  personalInfo)

Adds guid to personalinfo and then updates personalinfo async.

Parameters
personalInfoPersonalinfo to update
void Halyri.Connection.UpdatePriority ( UpdateConnectionPriorityRequest  priority)

Adds guid to priority and then updates priority async.

Parameters
priorityPriority to update
void Halyri.Connection.UploadMeasurementInstrumentData ( MeasurementInstrumentDto  instrument,
byte[]  data 
)

Uploads the provided instrument data from the specified instrument to the server.

Parameters
instrumentSource instrument of the measurement data
dataData provided by the instrument

Member Data Documentation

MediaConfigurationRequestUpdated Halyri.Connection.MediaConfigurationUpdatedEvent
MediaSendFinishedDelegate Halyri.Connection.MediaSendFinishedEvent
MediaSocketHasFailed Halyri.Connection.MediaSocketHasFailedEvent
UdpMediaDataReceived Halyri.Connection.UdpMediaDataReceivedEvent

Event Documentation

CloseMapRequest Halyri.Connection.CloseMapRequestEvent
Connected Halyri.Connection.ConnectedEvent
ConnectionFailed Halyri.Connection.ConnectionFailedEvent
InProcess Halyri.Connection.InProcessEvent
MeasurementInstrumentListRequestReceived Halyri.Connection.MeasurementInstrumentListRequestReceivedEvent
MeasurementStartRequestReceived Halyri.Connection.MeasurementStartRequestReceivedEvent
MeasurementStopRequestReceived Halyri.Connection.MeasurementStopRequestReceivedEvent
OpenMapRequest Halyri.Connection.OpenMapRequestEvent
Processed Halyri.Connection.ProcessedEvent
TextMessageReceived Halyri.Connection.TextMessageReceivedEvent

The documentation for this class was generated from the following file: