You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
584 B
36 lines
584 B
7 years ago
|
//
|
||
|
// Created by MightyPork on 2017/10/15.
|
||
|
//
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include "../demo.h"
|
||
|
|
||
7 years ago
|
TF_Result testIdListener(TF_Msg *msg)
|
||
7 years ago
|
{
|
||
|
printf("testIdListener()\n");
|
||
|
dumpFrameInfo(msg);
|
||
7 years ago
|
return TF_CLOSE;
|
||
7 years ago
|
}
|
||
|
|
||
7 years ago
|
TF_Result testGenericListener(TF_Msg *msg)
|
||
7 years ago
|
{
|
||
|
printf("testGenericListener()\n");
|
||
|
dumpFrameInfo(msg);
|
||
7 years ago
|
return TF_STAY;
|
||
7 years ago
|
}
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
TF_Init(TF_MASTER);
|
||
|
TF_AddGenericListener(testGenericListener);
|
||
|
|
||
|
demo_init(TF_MASTER);
|
||
|
|
||
|
TF_SendSimple(1, (pu8)"Ahoj", 5);
|
||
|
TF_SendSimple(1, (pu8)"Hello", 6);
|
||
|
|
||
7 years ago
|
TF_QuerySimple(2, (pu8)"Query!", 6, testIdListener, 0, NULL);
|
||
7 years ago
|
|
||
7 years ago
|
demo_sleep();
|
||
7 years ago
|
}
|