| 210 | 1. Make some changes to the {{{nodeHandler.rb}}} file of the OMF EC: |
| 211 | |
| 212 | Near the top, require the {{{oml4r}}} gem: |
| 213 | |
| 214 | {{{ |
| 215 | require 'oml4r' |
| 216 | }}} |
| 217 | |
| 218 | After {{{def interactive?}}} definition, add |
| 219 | |
| 220 | {{{ |
| 221 | |
| 222 | # |
| 223 | # Return the OMLize state of the Node Handler |
| 224 | # |
| 225 | # [Return] true/false |
| 226 | # |
| 227 | def self.omlize? |
| 228 | self.instance.omlize? |
| 229 | end |
| 230 | |
| 231 | def omlize? |
| 232 | @omlize |
| 233 | end |
| 234 | }}} |
| 235 | |
| 236 | Before the {{{Signal.trap('SIGINT') {Experiment.interrupt}}}}, add |
| 237 | |
| 238 | {{{ |
| 239 | if omlize? |
| 240 | opts = {:appName => 'omf', |
| 241 | :id => 'expctl', |
| 242 | :domain => 'experiment', |
| 243 | :omlCollectUri => 'tcp:localhost:3003'} |
| 244 | OML4R::init([], opts) |
| 245 | end |
| 246 | }}} |