Changes between Version 1 and Version 2 of Internal/AttenuatorAPI
- Timestamp:
- Jan 23, 2017, 7:32:18 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/AttenuatorAPI
v1 v2 4 4 All valid calls will reply with formatted XML. The first line will be `<response status="OK">` for commands that execute correctly, or `<response status="ERROR">` if either the parameters passed are invalid of the call failed for some other reason (check /var/log/syslog on the relevant Pi for more information). 5 5 || '''REST API Call''' || '''Description''' || 6 || /Attenuator/set?name=''<int>''&value=''<float>'' || Sets the requested attenuator to the desired dB value.||6 || /Attenuator/set?name=''<int>''&value=''<float>'' || Sets the requested attenuator to the closest possible dB value.|| 7 7 || /Attenuator/zero_all || Set all attenuators to 0 dB. || 8 8 || /Attenuator/read?name=''<int>'' || Read the current dB setting of the requested attenuator. || 9 9 || /Attenuator/read_all || Read the current dB setting of all attenuators. || 10 10 11 '''IMPORTANT NOTE:''' The attenuator API will round the requested set attenuator value to the nearest possible value based on the attenuator it has (eg. 37.63 dB with 0.5 dB/step attenuator will be rounded to 37.5 dB)11 '''IMPORTANT NOTE:''' The attenuator API will round the set request dB value to the nearest possible value based on the attenuator specs (eg. 37.63 dB with 0.5 dB/step attenuator will be rounded to 37.5 dB) 12 12 13 13 '''Example XML responses:'''