-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBtAssign.m
More file actions
32 lines (25 loc) · 815 Bytes
/
BtAssign.m
File metadata and controls
32 lines (25 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
classdef BtAssign < BtNode & BtBlackboardAffineExp
properties (Access = private)
target
end
methods
function obj = BtAssign(lhs,rhs)
obj = obj@BtBlackboardAffineExp(rhs);
assert(isa(lhs,'BtBlackboardEntry'))
obj.target = lhs;
end
function resp = do_task(obj)
obj.target.set_value(obj.get_value());
resp = BtrSuccess();
end
function str = to_str(obj,prefix)
str = sprintf('%s Set %s = %s', prefix, obj.target.name, to_str@BtBlackboardAffineExp(obj));
end
function str = plot_str(obj)
str = obj.to_str('');
end
function disp(obj)
disp@BtNode(obj)
end
end
end