Skip to content

Creating a new profile

vplachkov edited this page Jun 7, 2012 · 8 revisions

iviLink Profile provides connectivity functionality that is declared by Profile API. Profile inherits Profile API and implements its functionality. Every Profile and Profile API has its own UID (unique string value in system).

If you want to create Profile API do the next steps:

  1. Create C++ class that inherits CProfile class (from CProfile.hpp)

  2. Declare its functionality by adding pure virtual functions

  3. Create Profile API Manifest. It's an XML-file that contains information about its version, role and UID.

Example of simple class with Profile API: ISeatProfileAPI.hpp Example of Profile API Manifest: SeatProfile_API.xml

If you have Profile API to implement do the next steps:

  1. Create C++ class that inherits Profile API and IChannelSupervisorTubeObserver class (from IChannelSupervisorObserver.hpp)

  2. Implement functionality of Profile API.

  3. Add network interaction code:

  • add network messages from current side to another by using functionality of Channel Supervisor Tube (from ChannelSupervisorTube.hpp)

  • implement pure virtual functions of IChannelSupervisorObserver (to react on actions from another side of system)

Detailed example of Profile implementations are here: src/samples/linux/Profiles/ClimateProfileImpl

Clone this wiki locally