Changeset 74 in flair-dev for trunk/include


Ignore:
Timestamp:
May 24, 2018, 11:46:38 AM (7 years ago)
Author:
Sanahuja Guillaume
Message:

added simupressuresensor

Location:
trunk/include
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/FlairCore/ConnectedSocket.h

    r25 r74  
    5353  * \brief Returns a socket on a new incoming connexion
    5454  *
    55   * \param ConnectedSocket &listeningSocket
     55  * \param timeout timeout (in nanoseconds)
    5656  */
    5757  virtual ConnectedSocket *Accept(
     
    6565  * \param unsigned int port
    6666  * \param const distantAddress
    67   * \param timeout timeout (in milliseconds)
     67  * \param timeout timeout (in nanoseconds)
    6868  */
    6969  virtual bool Connect(const unsigned int port,
     
    7171
    7272  /*!
    73   * \brief Send a message
     73  * \brief Send a message waiting up to timeout ns
    7474  *
    7575  * \param message message
    7676  * \param message_len message length
    77   * \param timeout timeout (in milliseconds)
     77  * \param timeout timeout (in nanoseconds)
    7878  */
    7979  virtual ssize_t SendMessage(const char *message, size_t message_len,
     
    8383  * \brief Receive a message
    8484  *
    85   * Receive a message and wait up to timeout. \n
     85  * Receive a message and wait up to timeout ns. \n
    8686  *
    8787  * \param buf buffer to put the message
    8888  * \param buf_len buffer length
    89   * \param timeout timeout (in milliseconds)
     89  * \param timeout timeout (in nanoseconds)
    9090  *
    9191  * \return size of the received message
  • trunk/include/FlairCore/IODevice.h

    r50 r74  
    151151    void SetIsReady(bool status);
    152152
    153 private:
    154153  /*!
    155154  * \brief Update using provided datas
     
    164163  virtual void UpdateFrom(const io_data *data) = 0;
    165164
     165  private:
    166166  class IODevice_impl *pimpl_;
    167167};
  • trunk/include/FlairCore/Semaphore.h

    r62 r74  
    3131
    3232public:
     33  enum class Type { anonymous, named };
    3334  /*!
    3435  * \brief Constructor
     
    3940  * \param name name
    4041  */
    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);
    4243
    4344  /*!
     
    7475private:
    7576  class Semaphore_impl *pimpl_;
     77  Type type;
    7678};
    7779
  • trunk/include/FlairCore/SharedMem.h

    r62 r74  
    4040  * \param parent parent
    4141  * \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)
    4445  */
    4546  SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex);
  • trunk/include/FlairCore/TcpSocket.h

    r13 r74  
    3030  void Listen(const unsigned int port, const std::string localAddress = "ANY");
    3131  TcpSocket *Accept(
    32       Time timeout = 0); // should throw an exception if not a listening socket
     32      Time timeout = TIME_INFINITE);
    3333  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);
    3937
    4038  uint16_t NetworkToHost16(uint16_t data);
     
    4846  bool blockOnReceive;
    4947  bool isConnected;
     48  bool isListening;
    5049  unsigned int distantPort;
    5150  std::string distantAddress;
     51  char *sendRingBuffer, *recvRingBuffer;
    5252};
    5353
  • trunk/include/FlairSensorActuator/HostEthController.h

    r68 r74  
    2525
    2626namespace 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  }
    3838}
    3939
     
    4747*through ethernet connection
    4848*
    49 * There are 2 communication channels:
     49* There are 3 communication channels:
    5050*   - 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 receive
    53 *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)
    5454*/
    5555class HostEthController : public core::Thread, public core::IODevice {
     
    107107
    108108  bool ControllerInitialization();
    109   bool ConnectedWithTarget();
     109  bool ConnectWithTarget();
    110110  void SendControllerInfo();
    111111  void Run();
  • trunk/include/FlairSimulator/SimuUs.h

    r68 r74  
    6767  */
    6868  void UpdateFrom(const core::io_data *data){};
    69 
    70   /*!
    71   * \brief Run function
    72   *
    73   * Reimplemented from Thread.
    74   *
    75   */
    76   void Run(void);
    7769 
    7870  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
Note: See TracChangeset for help on using the changeset viewer.