2026-03-17 13:31:18 -07:00

62 lines
1.6 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package javax.baja.sync;
import com.tridium.sys.engine.NKnob;
import com.tridium.sys.schema.ComponentSlotMap;
import javax.baja.space.BComponentSpace;
import javax.baja.sync.SyncBuffer;
import javax.baja.sync.SyncDecoder;
import javax.baja.sync.SyncEncoder;
import javax.baja.sync.SyncOp;
import javax.baja.sys.BComponent;
import javax.baja.sys.Context;
import javax.baja.sys.Knob;
public class AddKnobOp
extends SyncOp {
Knob knob;
public int getId() {
return 107;
}
public Knob getKnob() {
return this.knob;
}
void commit(SyncBuffer syncBuffer, BComponentSpace bComponentSpace, Context context) throws Exception {
if (this.knob != null) {
((ComponentSlotMap)this.component.fw(1)).installKnob((NKnob)this.knob, true);
}
}
void encode(SyncEncoder syncEncoder) throws Exception {
super.encode(syncEncoder);
syncEncoder.endAttr().newLine();
syncEncoder.key("nk");
syncEncoder.encodeKnob((NKnob)this.knob);
syncEncoder.end(String.valueOf((char)this.getId())).newLine();
}
void decode(SyncBuffer syncBuffer, BComponentSpace bComponentSpace, SyncDecoder syncDecoder) throws Exception {
super.decode(syncBuffer, bComponentSpace, syncDecoder);
syncDecoder.next();
this.knob = syncDecoder.decodeKnob(this.component);
}
public String toString() {
return "AddKnob: " + this.componentToString() + ' ' + this.knob;
}
public AddKnobOp(BComponent bComponent, Knob knob) {
super(bComponent);
this.knob = knob;
}
public AddKnobOp() {
}
}