a3a92abf1ca043aaaaaa79381afa316abaa00ace
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

1) /*
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

2)  * EtherPix library
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

3)  *
Stefan Schuermans removed version information...

Stefan Schuermans authored 13 years ago

4)  * Copyright 2010-2011 Stefan Schuermans <stefan schuermans info>
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

5)  *
6)  * This program is free software: you can redistribute it and/or modify
7)  * it under the terms of the GNU General Public License as published by
8)  * the Free Software Foundation, version 3 of the License.
9)  *
10)  *
11)  * This program is distributed in the hope that it will be useful,
12)  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13)  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14)  * GNU General Public License for more details.
15)  *
16)  * You should have received a copy of the GNU Lesser General Public License
17)  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18)  */
19) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

20) #ifndef ETP_CONFIG_H
21) #define ETP_CONFIG_H
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

22) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

23) #include <etherpix/msg.h>
24) #include <etherpix/types.h>
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

25) #include <intern/types.h>
26) 
27) /** context information for processing config file */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

28) typedef struct etp_config_ctx_s
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

29) {
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

30)   etp_display_t *p_display;    /**< display to configure */
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

31)   unsigned int line_no;        /**< current line in config file */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

32)   etp_msg_func_p_t p_msg_func; /**< message callback function or NULL */
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

33)   void *p_msg_ctx;             /**< user context for message callback */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

34) } etp_config_ctx_t;
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

35) 
36) /**
37)  * \brief process distributor from config file
38)  *
39)  * \param[in,out] p_ctx context information
40)  * \param[in] p_setting_part2 second half of setting to process
41)  * \param[in] p_value value of setting
42)  * \return 0 in case of success, -1 in case of error
43)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

44) int etp_config_proc_distri(etp_config_ctx_t *p_ctx, char *p_setting_part2,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

45)                            char *value);
46) 
47) /**
48)  * \brief process mapping from config file
49)  *
50)  * \param[in,out] p_ctx context information
51)  * \param[in] p_setting_part2 second half of setting to process
52)  * \param[in] p_value value of setting
53)  * \return 0 in case of success, -1 in case of error
54)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

55) int etp_config_proc_mapping(etp_config_ctx_t *p_ctx, char *p_setting_part2,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

56)                             char *value);
57) 
58) /**
59)  * \brief process pixel from config file
60)  *
61)  * \param[in,out] p_ctx context information
62)  * \param[in] sz_pixel text of pixel to process
63)  * \param[in] distri number of distributor
64)  * \param[in] out number of output
65)  * \param[in] pix number of pixel
66)  * \return 0 in case of success, -1 in case of error
67)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

68) int etp_config_proc_pixel(etp_config_ctx_t *p_ctx, char *sz_pixel,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

69)                           unsigned int distri, unsigned int out,
70)                           unsigned int pix);
71) 
72) /**
73)  * \brief process output from config file
74)  *
75)  * \param[in,out] p_ctx context information
76)  * \param[in] p_setting_part2 second half of setting to process
77)  * \param[in] p_value value of setting
78)  * \return 0 in case of success, -1 in case of error
79)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

80) int etp_config_proc_output(etp_config_ctx_t *p_ctx, char *p_setting_part2,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

81)                            char *value);
82) 
83) /**
84)  * \brief process setting from config file
85)  *
86)  * \param[in,out] p_ctx context information
87)  * \param[in] p_setting setting to process
88)  * \param[in] p_value value of setting
89)  * \return 0 in case of success, -1 in case of error
90)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

91) int etp_config_proc_setting(etp_config_ctx_t *p_ctx, char *p_setting,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

92)                             char *p_value);
93) 
94) /**
95)  * \brief process line from config file
96)  *
97)  * \param[in,out] p_ctx context information
98)  * \param[in] p_line line to process
99)  * \return 0 in case of success, -1 in case of error
100)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

101) int etp_config_proc_line(etp_config_ctx_t *p_ctx, char *p_line);
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

102) 
103) /**
104)  * \brief process config file
105)  *
106)  * \param[in,out] p_display display to configure
107)  * \param[in] sz_config_file name of config file to read
108)  * \param[in] p_msg_func message callback function or NULL
109)  * \param[in] p_msg_ctx user context for message callback
110)  * \return 0 in case of success, -1 in case of error
111)  */
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

112) int etp_config_proc_file(etp_display_t *p_display,
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

113)                          const char *sz_config_file,
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

114)                          etp_msg_func_p_t p_msg_func, void *p_msg_ctx);
Stefan Schuermans v1.0.0

Stefan Schuermans authored 13 years ago

115) 
Stefan Schuermans rename "FlexiPix" to "Ether...

Stefan Schuermans authored 7 years ago

116) #endif /* #ifndef ETP_CONFIG_H */