在我的代理的启动方法中,我得到物理代理的代理 ID:
phy = agentForService(Services.PHYSICAL)
然后我尝试了不同的方法来设置 powerLevel 但通常是这样的:
phy.send(new ParameterReq().set(PhysicalChannelParam.powerLevel, -20))
phy.send(new ParameterReq().set(PhysicalChannelParam.powerLevel, [-20 -20 -20]))
phy.set(PhysicalChannelParam.powerLevel, [-20 -20 -20]
它们都不起作用。
我猜这是因为有多个物理通道(控制,数据)。
如何指定要更改功率级别的通道类型?
编辑:
一个解决方案显然是直接更改参数:
control_channel = phy[1]
control_channel.powerLevel = -20
但是,这感觉就像违反了 Fjåge 背后的基本思想。