-
Notifications
You must be signed in to change notification settings - Fork 3
/
REDIS.tlc
95 lines (68 loc) · 2.82 KB
/
REDIS.tlc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%% File : REDIS.tlc
%% Created: Thu Sep 17 02:10:04 2015
%%
%% Description:
%% Simulink Coder wrapper functions interface generated for
%% S-function "REDIS.cpp".
%%
%% File generated by S-function Builder Block
%%
%% For more information on using the Target Language with the
%% Simulink Coder, see the Target Language Compiler manual
%% (under Simulink Coder) in the "Inlining S-Functions"
%% chapter under the section and subsection:
%% "Writing Block Target Files to Inline S-Functions",
%% "Function-Based or Wrappered Code".
%%
%implements REDIS "C"
%% Function: BlockTypeSetup ===================================================
%%
%% Purpose:
%% Set up external references for wrapper functions in the
%% generated code.
%%
%function BlockTypeSetup(block, system) Output
%openfile externs
%<LibAddToCommonIncludes("hiredis/hiredis.h")>
extern void REDIS_Outputs_wrapper(void *S,
redisContext *c,
const uint8_T *input,
uint8_T *data ,
int32_T *status,
uint8_T *replyType,
uint32_T *numElements,
uint32_T data_width,
int_T tid);
%closefile externs
%<LibCacheExtern(externs)>
%%
%endfunction
%% Function: Outputs ==========================================================
%%
%% Purpose:
%% Code generation rules for mdlOutputs function.
%%
%function Outputs(block, system) Output
%%
%% Access to redis context pointer stored in Pointers-work vector.
%% NOTE*: Unlike DWork vectors, PWork vectors cannot be named in the generated code.
%% Also, you are allowed only one PWork vector.
%assign redisC = LibBlockPWork("", "", "", 0)
%% Get Address to FIRST input (QUERY)
%assign input = LibBlockInputSignalAddr(0, "", "", 0)
%% Get Address of FIRST output port (DATA)
%assign data = LibBlockOutputSignalAddr(1, "", "", 0)
%% Get Address of SECOND output port (STATUS)
%assign status = LibBlockOutputSignalAddr(2, "", "", 0)
%% Get Address of THIRD output port (REPLYCODE)
%assign replyType = LibBlockOutputSignalAddr(3, "", "", 0)
%% Get Address of FOURTH output port (NUM ELEMENTS)
%assign numElements = LibBlockOutputSignalAddr(4, "", "", 0)
%% Get Output port width of port DATA
%assign data_width = LibBlockOutputSignalWidth(1)
%% Get the model task identifier (sample time index) corresponding to the specified local S-function task identifier or port sample time
%assign tid = LibGetGlobalTIDFromLocalSFcnTID(0)
REDIS_Outputs_wrapper(%<tSimStruct>, (redisContext *)%<redisC>, %<input>, %<data>, %<status>, %<replyType>, %<numElements>, %<data_width>, %<tid>);
%%
%endfunction
%% [EOF] REDIS.tlc