Halyri - Mobiili  0.9.1
 All Classes Namespaces Functions Enumerations Properties
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)
 Invoked when media configuration update is requested. More...
 
delegate void Connected ()
 Invoked when connected More...
 
delegate void InProcess ()
 Invoked when connection is taken to process. More...
 
delegate void Processed ()
 Invoked when connection is processed. More...
 
delegate void OpenMapRequest ()
 Invoked when map is requested to open. More...
 
delegate void CloseMapRequest ()
 Invoked when map is requested to close. More...
 
delegate void TextMessageReceived (String message)
 Invoked when there is textmessage received. More...
 
delegate void MeasurementStartRequestReceived (MeasurementInstrumentDto instrument)
 Invoked when measurement data is requested to start with given instrument. More...
 
delegate void MeasurementStopRequestReceived (MeasurementInstrumentDto instrument)
 Invoked when measurement sending is requested to stop with given instrument. More...
 
delegate void MeasurementInstrumentListRequestReceived ()
 Invoked when received request for measurement instrument list. More...
 
delegate void ConnectionFailed ()
 Invoked when connection has failed. More...
 
 Connection ()
 Constructor that does nothing. More...
 
bool Connect (UpdateConnectionPriorityRequest priority)
 Connects signalR and wcf with given priority and stores guid. Updates personalinfo, location and device info. More...
 
void StartGpsTracking ()
 Starts Gps tracking with DesiredAccuracy high ad MovementThreshold as assigned. Basicly when phone moves MovementThreshold amount, this is invoked. More...
 
void StopGpsTracking ()
 Removes positionChanged handler. More...
 
void Disconnect ()
 Disconnects. More...
 
void Reconnect (UpdateConnectionPriorityRequest priority)
 Reconnects with given priority. More...
 
void UdpConnect ()
 Connects udp. More...
 
void UdpDisconnect ()
 Disconnects udp. More...
 
bool UdpMediaSend (MediaInformation mediaInfo, byte[] mediaData, int originalLength)
 Sends media with udp. More...
 
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)
 Updates EmergencyType. More...
 

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.

<author>Atte Söderlund</author>

Constructor & Destructor Documentation

Constructor that does nothing.

Member Function Documentation

delegate void CloseMapRequest ( )

Invoked when map is requested to close.

bool Connect ( UpdateConnectionPriorityRequest  priority)

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

Parameters
priorityPriority
delegate void Connected ( )

Invoked when connected

delegate void ConnectionFailed ( )

Invoked when connection has failed.

void Disconnect ( )

Disconnects.

delegate void InProcess ( )

Invoked when connection is taken to process.

delegate void MeasurementInstrumentListRequestReceived ( )

Invoked when received request for measurement instrument list.

delegate void MeasurementStartRequestReceived ( MeasurementInstrumentDto  instrument)

Invoked when measurement data is requested to start with given instrument.

Parameters
instrumentInstrument
delegate void MeasurementStopRequestReceived ( MeasurementInstrumentDto  instrument)

Invoked when measurement sending is requested to stop with given instrument.

Parameters
instrumentInstrument
delegate void MediaConfigurationRequestUpdated ( object  sender,
EventArgs  e,
MediaConfigurationDto  config 
)

Invoked when media configuration update is requested.

Parameters
config
delegate void OpenMapRequest ( )

Invoked when map is requested to open.

delegate void Processed ( )

Invoked when connection is processed.

void Reconnect ( UpdateConnectionPriorityRequest  priority)

Reconnects with given priority.

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

Sends media packet over the WCF connection to the server.

<author>Veli-Mikko Puupponen</author>

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

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

Parameters
messageMessage
void StartGpsTracking ( )

Starts Gps tracking with DesiredAccuracy high ad MovementThreshold as assigned. Basicly when phone moves MovementThreshold amount, this is invoked.

void StopGpsTracking ( )

Removes positionChanged handler.

void SwitchNoSound ( bool  value)

Switch nosound.

Parameters
valueValue to where to switch
delegate void TextMessageReceived ( String  message)

Invoked when there is textmessage received.

Parameters
messageReceived message
void UdpConnect ( )

Connects udp.

<author>Veli-Mikko Puupponen</author>

void UdpDisconnect ( )

Disconnects udp.

<author>Veli-Mikko Puupponen</author>

bool UdpMediaSend ( MediaInformation  mediaInfo,
byte[]  mediaData,
int  originalLength 
)

Sends media with udp.

<author>Veli-Mikko Puupponen</author>

Parameters
mediaInfoMedia information
mediaDataData
originalLengthLenght
Returns
void UpdateDeviceInfo ( UpdateDeviceInfoRequest  deviceInfo)

Adds guid to deviceinfo and then updates deviceinfo async.

Parameters
deviceInfoDeviceinfo to update
void UpdateEmergencyType ( string  emergencyType)

Updates EmergencyType.

Parameters
emergencyTypeType
void UpdateLocation ( LocationTypeDto  type)

Adds guid to location and then updates location async.

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

Updates Location with given goordinates as user specific type.

Parameters
coordinatesGoordinates
void UpdateMeasurementInstrumentList ( ObservableCollection< MeasurementInstrumentDto instrumentList)

Updates the provided list of measurement instruments to the server.

<author>Niko Mononen</author>

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

Adds guid to medicalinfo and then updates medicalinfo async.

Parameters
medicalInfoMedicalinfo to update
void UpdatePersonalInfo ( UpdatePersonalInfoRequest  personalInfo)

Adds guid to personalinfo and then updates personalinfo async.

Parameters
personalInfoPersonalinfo to update
void UpdatePriority ( UpdateConnectionPriorityRequest  priority)

Adds guid to priority and then updates priority async.

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

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

<author>Niko Mononen</author>

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

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