variables
{
dword gPfld_A; // provided field handle
}
void Initialize()
{
CONST dword FieldNotificationID = 30;
CONST dword FieldGetterID = 31;
CONST dword FieldSetterID = 32;
dword aep; // Application Endpoint handle
dword psi; // provided service handle
dword peg; // provided Eventgroup handle
// open Application Endpoint
aep = AREthOpenLocalApplicationEndpoint(17, 50002);
// create Service Instance
psi = AREthCreateProvidedServiceInstance(aep,12,1);
// create Eventgroup
peg = AREthAddProvidedEventGroup(psi,300);
// create field and add field to Eventgroup
gPfld_A = AREthAddField(psi, FieldNotificationID, FieldGetterID, FieldSetterID);
AREthAddFieldToEventGroup(peg,gPfld_A);
}
on key 'n'
{
// set value of field content (field has a common data type so no value path is needed)
AREthSetValueDWord(gPfld_A,"",100);
// commit field content ... notification is sent
AREthCommitField(gPfld_A);
}