Changeset 24595 for trunk/ippTasks/camera.pro
- Timestamp:
- Jun 25, 2009, 4:22:33 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/camera.pro (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/camera.pro
r24098 r24595 7 7 8 8 book init camPendingExp 9 book init camPendingCleanup9 #book init camPendingCleanup 10 10 11 11 macro camera.status 12 12 book listbook camPendingExp 13 book listbook camPendingCleanup13 # book listbook camPendingCleanup 14 14 end 15 15 16 16 macro camera.reset 17 17 book init camPendingExp 18 book init camPendingCleanup18 # book init camPendingCleanup 19 19 end 20 20 … … 37 37 end 38 38 39 macro camera.cleanup.on40 task camera.cleanup.load41 active true42 end43 task camera.cleanup.run44 active true45 end46 end47 48 macro camera.cleanup.off49 task camera.cleanup.load50 active false51 end52 task camera.cleanup.run53 active false54 end55 end39 # macro camera.cleanup.on 40 # task camera.cleanup.load 41 # active true 42 # end 43 # task camera.cleanup.run 44 # active true 45 # end 46 # end 47 48 # macro camera.cleanup.off 49 # task camera.cleanup.load 50 # active false 51 # end 52 # task camera.cleanup.run 53 # active false 54 # end 55 # end 56 56 57 57 # this variable will cycle through the known database names … … 199 199 end 200 200 201 # this variable will cycle through the known database names202 $camera_cleanup_DB = 0203 204 # select images ready for cam analysis205 # new entries are added to camPendingImfile206 # skip already-present entries207 task camera.cleanup.load208 host local209 210 periods -poll $LOADPOLL211 periods -exec $LOADEXEC212 periods -timeout 30213 npending 1214 active false215 216 stdout NULL217 stderr $LOGDIR/camera.cleanup.log218 219 task.exec220 if ($LABEL:n == 0) break221 $run = camtool -pendingcleanuprun222 if ($DB:n == 0)223 option DEFAULT224 else225 # save the DB name for the exit tasks226 option $DB:$camera_cleanup_DB227 $run = $run -dbname $DB:$camera_cleanup_DB228 $camera_cleanup_DB ++229 if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0230 end231 add_poll_args run232 add_poll_labels run233 command $run234 end235 236 # success237 task.exit 0238 # convert 'stdout' to book format239 ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT240 if ($VERBOSE > 2)241 book listbook camPendingCleanup242 end243 244 # delete existing entries in the appropriate pantaskStates245 process_cleanup camPendingCleanup246 end247 248 # locked list249 task.exit default250 showcommand failure251 end252 253 task.exit crash254 showcommand crash255 end256 257 # operation times out?258 task.exit timeout259 showcommand timeout260 end261 end262 263 # run the ipp_cleanup.pl script on pending images264 task camera.cleanup.run265 periods -poll $RUNPOLL266 periods -exec $RUNEXEC267 periods -timeout 60268 active false269 270 task.exec271 book npages camPendingCleanup -var N272 if ($N == 0) break273 if ($NETWORK == 0) break201 # # this variable will cycle through the known database names 202 # $camera_cleanup_DB = 0 203 204 # # select images ready for cam analysis 205 # # new entries are added to camPendingImfile 206 # # skip already-present entries 207 # task camera.cleanup.load 208 # host local 209 210 # periods -poll $LOADPOLL 211 # periods -exec $LOADEXEC 212 # periods -timeout 30 213 # npending 1 214 # active false 215 216 # stdout NULL 217 # stderr $LOGDIR/camera.cleanup.log 218 219 # task.exec 220 # if ($LABEL:n == 0) break 221 # $run = camtool -pendingcleanuprun 222 # if ($DB:n == 0) 223 # option DEFAULT 224 # else 225 # # save the DB name for the exit tasks 226 # option $DB:$camera_cleanup_DB 227 # $run = $run -dbname $DB:$camera_cleanup_DB 228 # $camera_cleanup_DB ++ 229 # if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0 230 # end 231 # add_poll_args run 232 # add_poll_labels run 233 # command $run 234 # end 235 236 # # success 237 # task.exit 0 238 # # convert 'stdout' to book format 239 # ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT 240 # if ($VERBOSE > 2) 241 # book listbook camPendingCleanup 242 # end 243 244 # # delete existing entries in the appropriate pantaskStates 245 # process_cleanup camPendingCleanup 246 # end 247 248 # # locked list 249 # task.exit default 250 # showcommand failure 251 # end 252 253 # task.exit crash 254 # showcommand crash 255 # end 256 257 # # operation times out? 258 # task.exit timeout 259 # showcommand timeout 260 # end 261 # end 262 263 # # run the ipp_cleanup.pl script on pending images 264 # task camera.cleanup.run 265 # periods -poll $RUNPOLL 266 # periods -exec $RUNEXEC 267 # periods -timeout 60 268 # active false 269 270 # task.exec 271 # book npages camPendingCleanup -var N 272 # if ($N == 0) break 273 # if ($NETWORK == 0) break 274 274 275 # look for new images in camPendingCleanup (pantaskState == INIT)276 book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT277 if ("$pageName" == "NULL") break278 279 book setword camPendingCleanup $pageName pantaskState RUN280 book getword camPendingCleanup $pageName camera -var CAMERA281 book getword camPendingCleanup $pageName state -var CLEANUP_MODE282 book getword camPendingCleanup $pageName cam_id -var CAM_ID283 book getword camPendingCleanup $pageName dbname -var DBNAME284 285 # specify choice of local or remote host based on camera and cam (class_id)286 set.host.for.camera $CAMERA FPA287 288 stdout $LOGDIR/camera.cleanup.log289 stderr $LOGDIR/camera.cleanup.log290 291 # XXX is everything listed here needed?292 $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE293 add_standard_args run294 295 # save the pageName for future reference below296 options $pageName297 298 # create the command line299 if ($VERBOSE > 1)300 echo command $run301 end302 command $run303 end304 305 # default exit status306 task.exit default307 process_exit camPendingCleanup $options:0 $JOB_STATUS308 end309 310 task.exit crash311 showcommand crash312 book setword camPendingCleanup $options:0 pantaskState CRASH313 end314 315 # operation timed out?316 task.exit timeout317 showcommand timeout318 book setword camPendingCleanup $options:0 pantaskState TIMEOUT319 end320 end275 # # look for new images in camPendingCleanup (pantaskState == INIT) 276 # book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT 277 # if ("$pageName" == "NULL") break 278 279 # book setword camPendingCleanup $pageName pantaskState RUN 280 # book getword camPendingCleanup $pageName camera -var CAMERA 281 # book getword camPendingCleanup $pageName state -var CLEANUP_MODE 282 # book getword camPendingCleanup $pageName cam_id -var CAM_ID 283 # book getword camPendingCleanup $pageName dbname -var DBNAME 284 285 # # specify choice of local or remote host based on camera and cam (class_id) 286 # set.host.for.camera $CAMERA FPA 287 288 # stdout $LOGDIR/camera.cleanup.log 289 # stderr $LOGDIR/camera.cleanup.log 290 291 # # XXX is everything listed here needed? 292 # $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE 293 # add_standard_args run 294 295 # # save the pageName for future reference below 296 # options $pageName 297 298 # # create the command line 299 # if ($VERBOSE > 1) 300 # echo command $run 301 # end 302 # command $run 303 # end 304 305 # # default exit status 306 # task.exit default 307 # process_exit camPendingCleanup $options:0 $JOB_STATUS 308 # end 309 310 # task.exit crash 311 # showcommand crash 312 # book setword camPendingCleanup $options:0 pantaskState CRASH 313 # end 314 315 # # operation timed out? 316 # task.exit timeout 317 # showcommand timeout 318 # book setword camPendingCleanup $options:0 pantaskState TIMEOUT 319 # end 320 # end
Note:
See TracChangeset
for help on using the changeset viewer.
