Changeset 74 in flair-dev for trunk/include
- Timestamp:
- May 24, 2018, 11:46:38 AM (7 years ago)
- Location:
- trunk/include
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairCore/ConnectedSocket.h
r25 r74 53 53 * \brief Returns a socket on a new incoming connexion 54 54 * 55 * \param ConnectedSocket &listeningSocket55 * \param timeout timeout (in nanoseconds) 56 56 */ 57 57 virtual ConnectedSocket *Accept( … … 65 65 * \param unsigned int port 66 66 * \param const distantAddress 67 * \param timeout timeout (in milliseconds)67 * \param timeout timeout (in nanoseconds) 68 68 */ 69 69 virtual bool Connect(const unsigned int port, … … 71 71 72 72 /*! 73 * \brief Send a message 73 * \brief Send a message waiting up to timeout ns 74 74 * 75 75 * \param message message 76 76 * \param message_len message length 77 * \param timeout timeout (in milliseconds)77 * \param timeout timeout (in nanoseconds) 78 78 */ 79 79 virtual ssize_t SendMessage(const char *message, size_t message_len, … … 83 83 * \brief Receive a message 84 84 * 85 * Receive a message and wait up to timeout . \n85 * Receive a message and wait up to timeout ns. \n 86 86 * 87 87 * \param buf buffer to put the message 88 88 * \param buf_len buffer length 89 * \param timeout timeout (in milliseconds)89 * \param timeout timeout (in nanoseconds) 90 90 * 91 91 * \return size of the received message -
trunk/include/FlairCore/IODevice.h
r50 r74 151 151 void SetIsReady(bool status); 152 152 153 private:154 153 /*! 155 154 * \brief Update using provided datas … … 164 163 virtual void UpdateFrom(const io_data *data) = 0; 165 164 165 private: 166 166 class IODevice_impl *pimpl_; 167 167 }; -
trunk/include/FlairCore/Semaphore.h
r62 r74 31 31 32 32 public: 33 enum class Type { anonymous, named }; 33 34 /*! 34 35 * \brief Constructor … … 39 40 * \param name name 40 41 */ 41 Semaphore(const Object *parent, uint32_t initialValue, std::string name = "" );42 Semaphore(const Object *parent, uint32_t initialValue, std::string name = "", Type type=Type::anonymous); 42 43 43 44 /*! … … 74 75 private: 75 76 class Semaphore_impl *pimpl_; 77 Type type; 76 78 }; 77 79 -
trunk/include/FlairCore/SharedMem.h
r62 r74 40 40 * \param parent parent 41 41 * \param name name 42 * \param size size of the shared memory 43 * \param blockOnRead if true reading will block if nothing written 42 * \param size size of the shared memory:w 43 * 44 * \param type mutex or producerConsumer. Mutex type is for symmetrical use (default) 44 45 */ 45 46 SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex); -
trunk/include/FlairCore/TcpSocket.h
r13 r74 30 30 void Listen(const unsigned int port, const std::string localAddress = "ANY"); 31 31 TcpSocket *Accept( 32 Time timeout = 0); // should throw an exception if not a listening socket32 Time timeout = TIME_INFINITE); 33 33 bool Connect(const unsigned int distantPort, const std::string distantAddress, 34 Time timeout = 0); // timeout in milliseconds 35 ssize_t SendMessage(const char *message, size_t message_len, 36 Time timeout = 0); // timeout in milliseconds 37 ssize_t RecvMessage(char *buf, size_t buf_len, 38 Time timeout = 0); // timeout in milliseconds 34 Time timeout = TIME_INFINITE); 35 ssize_t SendMessage(const char *message, size_t message_len, Time timeout = TIME_INFINITE); 36 ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout = TIME_INFINITE); 39 37 40 38 uint16_t NetworkToHost16(uint16_t data); … … 48 46 bool blockOnReceive; 49 47 bool isConnected; 48 bool isListening; 50 49 unsigned int distantPort; 51 50 std::string distantAddress; 51 char *sendRingBuffer, *recvRingBuffer; 52 52 }; 53 53 -
trunk/include/FlairSensorActuator/HostEthController.h
r68 r74 25 25 26 26 namespace flair { 27 namespace core {28 class Matrix;29 class TcpSocket;30 class UdpSocket;31 class Mutex;32 }33 namespace gui {34 class Tab;35 class TabWidget;36 class DataPlot1D;37 }27 namespace core { 28 class Matrix; 29 class TcpSocket; 30 class UdpSocket; 31 class Mutex; 32 } 33 namespace gui { 34 class Tab; 35 class TabWidget; 36 class DataPlot1D; 37 } 38 38 } 39 39 … … 47 47 *through ethernet connection 48 48 * 49 * There are 2communication channels:49 * There are 3 communication channels: 50 50 * - 1 connection with the ground station to display the values. Output for 51 *analog sticks is normalized in the range [-1, 1] (float values) 52 * - 1 connection with the target to send the controller values ( and receive53 * controller state modification requests)51 *analog sticks is normalized in the range [-1, 1] (float values) (through DrawUserInterface, use a UDT socket) 52 * - 1 connection with the target to send the controller values (through udp socket - high bandwitdh, packets may be discarded) 53 * - 1 connection with the target to receive controller state modification requests (through tcp socket - low bandwidth, packets must not be discarded) 54 54 */ 55 55 class HostEthController : public core::Thread, public core::IODevice { … … 107 107 108 108 bool ControllerInitialization(); 109 bool Connect edWithTarget();109 bool ConnectWithTarget(); 110 110 void SendControllerInfo(); 111 111 void Run(); -
trunk/include/FlairSimulator/SimuUs.h
r68 r74 67 67 */ 68 68 void UpdateFrom(const core::io_data *data){}; 69 70 /*!71 * \brief Run function72 *73 * Reimplemented from Thread.74 *75 */76 void Run(void);77 69 78 70 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
Note:
See TracChangeset
for help on using the changeset viewer.