@@ -495,50 +495,89 @@ def mark_coord(self, x, y, z, property, mark_as): # TODO: Fix "label"
495
495
496
496
# return ...
497
497
498
- # verify_tool() --> check
499
- # mount_tool() --> check
500
- # dismount_tool() --> check
498
+ # TODO: verify_tool() --> get broker message example
499
+ # TODO: mount_tool() --> get broker message example
500
+ # TODO: dismount_tool() --> get broker message example
501
+
502
+ # def mount_tool(self, x, y, z):
503
+ # mount_tool_message = {
504
+ # **RPC_REQUEST,
505
+ # "body": {
506
+ # "kind": "execute",
507
+ # "body": {
508
+ # "kind": "parameter_application",
509
+ # "args": {
510
+ # "label": "Tool",
511
+ # "data_value": {
512
+ # "kind": "coordinate",
513
+ # "args": {
514
+ # "x": x,
515
+ # "y": y,
516
+ # "z": z
517
+ # }
518
+ # }
519
+ # }
520
+ # }
521
+ # }
522
+ # }
523
+
524
+ # self.broker_connect.publish(mount_tool_message)
525
+ # # return ...
526
+
527
+ # TODO: water() --> all or single coords
528
+ # TODO: dispense() --> single coords?
529
+
530
+ # TODO: sequence()
531
+ # TODO: get_seed_tray_call(tray, cell)
532
+ # TODO: sort(points, method) --> API?
533
+
534
+ # TODO: get_job() --> access status tree --> fetch all or single by name
535
+ # TODO: set_job() --> access status tree --> inject(?) new or edit single by name
536
+ # TODO: complete_job() --> access status tree --> edit single by name
537
+
538
+ def lua (self , code_snippet ): # TODO: verify working
539
+ lua_message = {
540
+ ** RPC_REQUEST ,
541
+ "body" : {
542
+ "kind" : "lua" ,
543
+ "args" : {
544
+ "lua" : code_snippet
545
+ }
546
+ }
547
+ }
501
548
502
- def mount_tool (self , x , y , z ):
503
- mount_tool_message = {
549
+ self .broker_connect .publish (lua_message )
550
+ # return ...
551
+
552
+ def if_statement (self , variable , operator , value , then_id , else_id ): # TODO: add 'do nothing' functionality
553
+ if_statement_message = {
504
554
** RPC_REQUEST ,
505
555
"body" : {
506
- "kind" : "execute" ,
507
- "body" : {
508
- "kind" : "parameter_application" ,
509
- "args" : {
510
- "label" : "Tool" ,
511
- "data_value" : {
512
- "kind" : "coordinate" ,
513
- "args" : {
514
- "x" : x ,
515
- "y" : y ,
516
- "z" : z
517
- }
556
+ "kind" : "_if" ,
557
+ "args" : {
558
+ "lhs" : variable ,
559
+ "op" : operator ,
560
+ "rhs" : value ,
561
+ "_then" : {
562
+ "kind" : "execute" ,
563
+ "args" : {
564
+ "sequence_id" : then_id
565
+ }
566
+ },
567
+ "_else" : {
568
+ "kind" : "execute" ,
569
+ "args" : {
570
+ "sequence_id" : else_id
518
571
}
519
572
}
520
573
}
521
574
}
522
575
}
523
576
524
- self .broker_connect .publish (mount_tool_message )
577
+ self .broker_connect .publish (if_statement_message )
525
578
# return ...
526
579
527
- # water() --> check
528
- # dispense() --> check
529
-
530
- # sequence() --> check
531
- # get_seed_tray_call(tray, cell) --> check
532
- # sort(points, method) --> check (API?)
533
-
534
- # get_job() --> LUA
535
- # set_job() --> LUA
536
- # complete_job() --> LUA
537
-
538
- # lua() --> sequence (broker message)
539
- # if_statement() --> sequence (broker message)
540
-
541
- def assertion (self , code , as_type , id = '' ):
580
+ def assertion (self , code , as_type , id = '' ): # TODO: add 'continue' functionality
542
581
assertion_message = {
543
582
** RPC_REQUEST ,
544
583
"body" : {
0 commit comments