Kuon  1.1.3
RoadNarrows Robotics Large Outdoor Mobile Robot Project
bsMouseBot.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Package: mousebot
4 //
5 // File: bsMouseBot.h
6 //
7 /*! \file
8  *
9  * $LastChangedDate: 2012-04-26 12:16:42 -0600 (Thu, 26 Apr 2012) $
10  * $Rev: 1899 $
11  *
12  * \brief \h_botsense bsProxy client library MouseBot robot interface.
13  *
14  * \author Robin Knight (robin.knight@roadnarrows.com)
15  *
16  * \copyright
17  * \h_copy 2012-2017. RoadNarrows LLC.\n
18  * http://www.roadnarrows.com\n
19  * All Rights Reserved
20  */
21 // Permission is hereby granted, without written agreement and without
22 // license or royalty fees, to use, copy, modify, and distribute this
23 // software and its documentation for any purpose, provided that
24 // (1) The above copyright notice and the following two paragraphs
25 // appear in all copies of the source code and (2) redistributions
26 // including binaries reproduces these notices in the supporting
27 // documentation. Substantial modifications to this software may be
28 // copyrighted by their authors and need not follow the licensing terms
29 // described here, provided that the new terms are clearly indicated in
30 // all files where they apply.
31 //
32 // IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY MEMBERS/EMPLOYEES
33 // OF ROADNARROW LLC OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY
34 // PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
35 // DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
36 // EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF
37 // THE POSSIBILITY OF SUCH DAMAGE.
38 //
39 // THE AUTHOR AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES,
40 // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
41 // FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
42 // "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
43 // PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
44 //
45 ////////////////////////////////////////////////////////////////////////////////
46 
47 #ifndef _BSMOUSEBOT_H
48 #define _BSMOUSEBOT_H
49 
50 #include "rnr/rnrconfig.h"
51 
52 #include "botsense/BotSense.h"
53 #include "botsense/libBotSense.h"
54 
55 #include "Kuon/mousebot.h"
56 
57 #ifndef SWIG
58 C_DECLS_BEGIN
59 #endif // SWIG
60 
61 #define BS_MOUSEBOT_DEV_NAME "/mousebot"
62  ///< MouseBot robot device
63 
64 #define BS_MOUSEBOT_SERVER_MOD "libbsserver_mousebot"
65  ///< server plugin dll module
66 
67 #define BS_MOUSEBOT_CLIENT_LIB "libbsclient_mousebot"
68  ///< client app library
69 
70 
71 extern const char *bsMouseBotGetMsgName(BsClient_P pClient,
72  BsVConnHnd_T hndVConn,
73  uint_t uMsgId);
74 
75 extern int bsMouseBotReqOpen( BsClient_P pClient,
76  const char* dev1,
77  const char* dev2,
78  bool_t server,
79  bool_t bInitTrace);
80 
81 extern int bsMouseBotReqClose(BsClient_P pClient, BsVConnHnd_T hndVConn);
82 
83 extern int bsMouseBotReqSetMotorSpeeds(BsClient_P pClient,
84  BsVConnHnd_T hndVConn,
85  int nSpeedLeft,
86  int nSpeedRight);
87 
88 extern int bsMouseBotReqGetMotorSpeeds(BsClient_P pClient,
89  BsVConnHnd_T hndVConn,
90  int *pnSpeedLeft,
91  int *pnSpeedRight);
92 
93 extern int bsMouseBotReqAlterBrake(BsClient_P pClient,
94  BsVConnHnd_T hndVConn,
95  int pnbrakeFL,
96  int pnbrakeFR,
97  int pnbrakeRL,
98  int pnbrakeRR);
99 
100 extern int bsMouseBotReqAlterSlew(BsClient_P pClient,
101  BsVConnHnd_T hndVConn,
102  int pnslewFL,
103  int pnslewFR,
104  int pnslewRL,
105  int pnslewRR);
106 
107 
108 extern int bsMouseBotReqStop(BsClient_P pClient, BsVConnHnd_T hndVConn);
109 
110 extern int bsMouseBotReqGetMotorCfg(BsClient_P pClient,
111  BsVConnHnd_T hndVConn,
112  uint_t uWhich,
113  MouseBotMotorCfg_T *pMotorCfg);
114 
115 extern int bsMouseBotReqSetMotorCfg(BsClient_P pClient,
116  BsVConnHnd_T hndVConn,
117  uint_t uWhich,
118  MouseBotMotorCfg_T *pMotorCfg);
119 
120 extern int bsMouseBotReqGetFwVer(BsClient_P pClient,
121  BsVConnHnd_T hndVConn,
122  uint_t *puVersion,
123  uint_t *puRevision);
124 
125 #ifndef SWIG
126 C_DECLS_END
127 #endif // SWIG
128 
129 #endif // _BSMOUSEBOT_H
RoadNarrows MouseBot robot top-level header file.