Skip to content

Commit

Permalink
reify()-wrappers are now generated by simStubsGen
Browse files Browse the repository at this point in the history
  • Loading branch information
fferri committed Nov 15, 2023
1 parent 58451a1 commit 64dba54
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions simROS2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,4 @@ end

(require 'simROS2-typecheck')(simROS2)

-- accept pure function where callback string is expected:

simROS2.createSubscription = wrap(simROS2.createSubscription, function(origFunc)
return function(topicName, topicType, topicCallback, ...)
return origFunc(topicName, topicType, reify(topicCallback), ...)
end
end)

simROS2.createService = wrap(simROS2.createService, function(origFunc)
return function(serviceName, serviceType, serviceCallback)
return origFunc(serviceName, serviceType, reify(serviceCallback))
end
end)

simROS2.createActionClient = wrap(simROS2.createActionClient, function(origFunc)
return function(actionName, actionType, goalResponseCallback, feedbackCallback, resultCallback)
return origFunc(actionName, actionType, reify(goalResponseCallback), reify(feedbackCallback), reify(resultCallback))
end
end)

simROS2.createActionServer = wrap(simROS2.createActionServer, function(origFunc)
return function(actionName, actionType, handleGoalCallback, handleCancelCallback, handleAcceptedCallback)
return origFunc(actionName, actionType, reify(handleGoalCallback), reify(handleCancelCallback), reify(handleAcceptedCallback))
end
end)

simROS2.imageTransportCreateSubscription = wrap(simROS2.imageTransportCreateSubscription, function(origFunc)
return function(topicName, topicCallback, ...)
return origFunc(topicName, reify(topicCallback), ...)
end
end)

return simROS2

0 comments on commit 64dba54

Please sign in to comment.