Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweaks documentation #265

Merged
merged 4 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ Visit the [documentation page](https://ignitionrobotics.org/api/transport/11.0/i
```
ign-transport
├── conf Configuration file for the integration with the `ign` CLI tool.
├── docker Dockerfile with ign-transport installed and scripts to build and run the code.
├── example Example programs that use most of the Ignition Transport API.
├── include Header files that get installed.
├── log All the code related with Ignition Transport logging.
├── src Source code of the core library.
├── test A directory of integration, performance and regression tests.
├── tools Scripts for continuous integration testing.
└── tutorials A set of tutorials about Ignition Transport features.
```

Expand Down
5 changes: 3 additions & 2 deletions example/bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <chrono>
#include <condition_variable>
#include <csignal>
#include <exception>
#include <iostream>
#include <string>
#include <thread>
Expand Down Expand Up @@ -233,7 +234,7 @@ class ReplyTester
std::cerr << "Received[" << _msg.header().stamp().sec()
<< "] Expected[" << this->prevStamp+1 << "]\n";

throw std::unexpected;
std::terminate();
}
}

Expand Down Expand Up @@ -548,7 +549,7 @@ class PubTester
{
std::cerr << "Received[" << _msg.header().stamp().sec()
<< "] Expected[" << this->expectedStamp << "]\n";
throw std::unexpected;
std::terminate();
}
this->expectedStamp++;

Expand Down
3 changes: 2 additions & 1 deletion src/Discovery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE

try
{
zmq::poll(&items[0], sizeof(items) / sizeof(items[0]), _timeout);
zmq::poll(&items[0], sizeof(items) / sizeof(items[0]),
std::chrono::milliseconds(_timeout));
}
catch(...)
{
Expand Down
4 changes: 2 additions & 2 deletions src/NodeShared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ void NodeShared::RunReceptionTask()
try
{
zmq::poll(&items[0], sizeof(items) / sizeof(items[0]),
NodeSharedPrivate::Timeout);
std::chrono::milliseconds(NodeSharedPrivate::Timeout));
}
catch(...)
{
Expand Down Expand Up @@ -1677,7 +1677,7 @@ void NodeSharedPrivate::AccessControlHandler()
try
{
zmq::poll(&items[0], sizeof(items) / sizeof(items[0]),
NodeSharedPrivate::Timeout);
std::chrono::milliseconds(NodeSharedPrivate::Timeout));
}
catch(...)
{
Expand Down
2 changes: 1 addition & 1 deletion src/NodeSharedPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ namespace ignition
public: std::atomic<bool> exit = false;

/// \brief Timeout used for receiving messages (ms.).
public: static const int Timeout = 250;
public: inline static const int Timeout = 250;

////////////////////////////////////////////////////////////////
/////// The following is for asynchronous publication of ///////
Expand Down
31 changes: 30 additions & 1 deletion tutorials/02_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,36 @@ cd /tmp/ign-transport/build
sudo make uninstall
```

### macOS

1. Clone the repository
```
git clone https://github.com/ignitionrobotics/ign-transport -b ign-transport<#>
```
Be sure to replace `<#>` with a number value, such as 10 or 11, depending on
which version you need.

2. Install dependencies
```
brew install --only-dependencies ignition-transport<#>
```
Be sure to replace `<#>` with a number value, such as 10 or 11, depending on
which version you need.

3. Configure and build
```
cd ign-transport
mkdir build
cd build
cmake ..
make
```

4. Optionally, install
```
sudo make install
```

## Windows

### Prerequisites
Expand Down Expand Up @@ -273,4 +303,3 @@ can run:
```
make test
```