asrt
Automated System Runtime Testing library
Loading...
Searching...
No Matches
controller.h
1
12#ifndef ASRTC_CONTROLLER_H
13#define ASRTC_CONTROLLER_H
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include "../asrtl/allocator.h"
20#include "../asrtl/chann.h"
21#include "../asrtl/span.h"
22#include "../asrtl/status.h"
23#include "./handlers.h"
24
26enum asrt_cntr_state
27{
28 ASRT_CNTR_INIT = 0x01,
29 ASRT_CNTR_IDLE = 0x02,
30 ASRT_CNTR_HNDL_TC = 0x10,
31 ASRT_CNTR_HNDL_DESC = 0x11,
32 ASRT_CNTR_HNDL_TI = 0x12,
33 ASRT_CNTR_HNDL_EXEC = 0x13,
34};
35
42{
43 struct asrt_node node;
44 struct asrt_allocator alloc;
45
46 uint32_t run_id;
47 enum asrt_cntr_state state;
48 enum asrt_stage_e stage;
49 uint32_t deadline;
50 union
51 {
52 struct asrt_init_handler init;
53 struct asrt_tc_handler tc;
54 struct asrt_desc_handler desc;
55 struct asrt_ti_handler ti;
56 struct asrt_exec_handler exec;
57 } hndl;
58};
59
62enum asrt_status asrt_cntr_init(
63 struct asrt_controller* c,
64 struct asrt_send_req_list* send_queue,
65 struct asrt_allocator alloc );
66
69enum asrt_status asrt_cntr_start(
70 struct asrt_controller* c,
71 asrt_init_callback cb,
72 void* ptr,
73 uint32_t timeout );
74
76uint32_t asrt_cntr_idle( struct asrt_controller const* c );
77
79enum asrt_status asrt_cntr_desc(
80 struct asrt_controller* c,
81 asrt_desc_callback cb,
82 void* ptr,
83 uint32_t timeout );
85enum asrt_status asrt_cntr_test_count(
86 struct asrt_controller* c,
87 asrt_test_count_callback cb,
88 void* ptr,
89 uint32_t timeout );
91enum asrt_status asrt_cntr_test_info(
92 struct asrt_controller* c,
93 uint16_t id,
94 asrt_test_info_callback cb,
95 void* ptr,
96 uint32_t timeout );
97
99enum asrt_status asrt_cntr_test_exec(
100 struct asrt_controller* c,
101 uint16_t id,
102 asrt_test_result_callback cb,
103 void* ptr,
104 uint32_t timeout );
105
107void asrt_cntr_deinit( struct asrt_controller* c );
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee ...
Definition: allocator.h:28
Controller module — CORE channel, host side.
Definition: controller.h:42
Definition: handlers.h:69
Definition: handlers.h:91
Definition: handlers.h:43
A node in a doubly-linked channel chain.
Definition: chann.h:122
Intrusive FIFO of outgoing send requests.
Definition: chann.h:76
Definition: handlers.h:59
Definition: handlers.h:79