Publisher init() overload with priority argument

This commit is contained in:
Pavel Kirienko
2015-07-05 09:34:34 +03:00
parent 27ec2419ff
commit 7240e0d6d2
2 changed files with 19 additions and 0 deletions
@@ -126,6 +126,15 @@ public:
return checkInit();
}
/**
* This overload allows to set the priority; otherwise it's the same.
*/
int init(TransferPriority priority)
{
setPriority(priority);
return checkInit();
}
int publish(const DataStruct& message, TransferType transfer_type, NodeID dst_node_id,
MonotonicTime blocking_deadline = MonotonicTime())
{
@@ -324,6 +324,16 @@ public:
return publisher_.init();
}
/**
* Shall be called before first use.
* This overload allows to set the priority, otherwise it's the same.
* Returns negative error code.
*/
int init(TransferPriority priority)
{
return publisher_.init(priority);
}
/**
* Performs non-blocking service call.
* This method transmits the service request and returns immediately.