Skip to content

Creating a new profile

promihu edited this page Jun 5, 2012 · 8 revisions

Every iviLink Profile inherits one Profile API and implements its functionality. If you don't have Profile API for you Profile, you need to create it.

How to create Profile API:

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

  2. Declare its functionality by adding pure virtual functions

Example of simple class with Profile API: ISeatProfileAPI.hpp

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