FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

The FireSync API is a collection of classes that implement core APIs and services related to FireSync nodes.

The kFireSync/Client API is used to control remote or local (in-process) nodes, providing support for sensor discovery, peripheral configuration (e.g., cameras, lights), firmware and file system uploads, data streaming, etc. The kFireSync library also implements a variety of other frameworks and API that are used to build sensor firmware (e.g., Server framework, Pipe framework, Actions framework).

kFireSync is a type assembly, based on the Zen type system. A small kFireSync program is shown below:

#include <kFireSync/kFsApi.h> //include all kFireSync headers
int main()
{
kAssembly assembly = kNULL; //type assembly handle
kSystem system = kNULL; //FireSync sensor system
kSize i;
//get an initialized reference to kFireSync's core type assembly
kCheck(kFsLib_Construct(&assembly));
//construct a FireSync system object
kCheck(kSystem_Construct(&system, kNULL));
//print the serial number of each discovered device
for (i = 0; i < kSystem_NodeCount(system); ++i)
{
kNode node = kSystem_NodeAt(system, i);
printf("Node Id: %u\n", kNode_Id(node));
}
//destroy the system object
kCheck(kObject_Destroy(system));
//release the FireSync type assembly
kCheck(kObject_Destroy(assembly));
return kOK;
}
See also
kSystem, kNode