I am not sure if this is the best way but you can:
- add a new message in conf/messages.xml
- create a new module. You can copy a simple one like servo_switch and change the name. Look in conf/modules and sw/airborne/modules
- the module has a function called servo_switch_periodic() which you can rename for example to my_module_periodic() . This function is called periodically according to the module xml config file
- in your periodic function you call the function which sends the message. Take a look at airborne/modules/digital_cam/dc.c where it says DOWNLINK_SEND_DC_SHOT . If you named your message MY_DATA then call DOWNLINK_SEND_MY_DATA with the parameters which should match the definition of the message in messages.xml
Hopefully someone can provide a better solution.