Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
e01ba6d7
Commit
e01ba6d7
authored
16 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
PPI: Extend ppi::connect() / connector compatibility documentation
parent
65dd34c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
PPI/Connectors.hh
+20
-8
20 additions, 8 deletions
PPI/Connectors.hh
PPI/Setup.hh
+2
-1
2 additions, 1 deletion
PPI/Setup.hh
with
22 additions
and
9 deletions
PPI/Connectors.hh
+
20
−
8
View file @
e01ba6d7
...
@@ -47,9 +47,10 @@ namespace connector {
...
@@ -47,9 +47,10 @@ namespace connector {
/** \namespace senf::ppi::connector
/** \namespace senf::ppi::connector
\brief Connector classes
\brief Connector classes
A connector has two independent properties
A connector has three independent properties
- it may be \e active or \e passive
\li it may be \e active or \e passive
- it may be an \e input or an \e output
\li it may be an \e input or an \e output
\li it has an (optional) packet type
\e Active connectors are activated from within the module, \e passive connectors are
\e Active connectors are activated from within the module, \e passive connectors are
signaled by the external framework. \e Input modules receive packets, \e output modules send
signaled by the external framework. \e Input modules receive packets, \e output modules send
...
@@ -58,11 +59,12 @@ namespace connector {
...
@@ -58,11 +59,12 @@ namespace connector {
All passive connectors call some onRequest callback whenever I/O needs to be performed. All
All passive connectors call some onRequest callback whenever I/O needs to be performed. All
input modules possess a packet queue.
input modules possess a packet queue.
We therefore have 4 connector types:
We therefore have 4 connector types each of which is parameterized by the type of packet
- senf::ppi::connector::ActiveInput
traversing the connector:
- senf::ppi::connector::ActiveOutput
\li senf::ppi::connector::ActiveInput
- senf::ppi::connector::PassiveInput
\li senf::ppi::connector::ActiveOutput
- senf::ppi::connector::PassiveOutput.
\li senf::ppi::connector::PassiveInput
\li senf::ppi::connector::PassiveOutput.
Connectors are declared as module data members and are then externally connected to other
Connectors are declared as module data members and are then externally connected to other
modules.
modules.
...
@@ -100,6 +102,16 @@ namespace connector {
...
@@ -100,6 +102,16 @@ namespace connector {
\ref ppi_connectors
\ref ppi_connectors
*/
*/
/** \brief Incompatible connectors connected
This exception is thrown, when two incompatible connectors are connected. This happens if
both connectors of a senf::ppi::connect() statement declare a packet type (the connector
template argument) but they don't declare the same packet type.
You need to ensure, that both connectors use the same packet type.
\see senf::ppi::connect()
*/
struct
IncompatibleConnectorsException
:
public
senf
::
Exception
struct
IncompatibleConnectorsException
:
public
senf
::
Exception
{
IncompatibleConnectorsException
()
:
senf
::
Exception
(
"Incompatible connectors"
)
{}
};
{
IncompatibleConnectorsException
()
:
senf
::
Exception
(
"Incompatible connectors"
)
{}
};
...
...
This diff is collapsed.
Click to expand it.
PPI/Setup.hh
+
2
−
1
View file @
e01ba6d7
...
@@ -52,7 +52,8 @@ namespace ppi {
...
@@ -52,7 +52,8 @@ namespace ppi {
\li Either or both of the connectors are untyped (they accept/send arbitrary senf::Packet's)
\li Either or both of the connectors are untyped (they accept/send arbitrary senf::Packet's)
\li Both connectors send/accept the exactly same packet type.
\li Both connectors send/accept the exactly same packet type.
\throws IncompatibleConnectorsException if the two connectors are not type compatible.
\throws connector::IncompatibleConnectorsException if the two connectors are not type
compatible.
\see \ref ppi_connections
\see \ref ppi_connections
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment