Unusual Data Types

博客介绍了结构体的作用,如明确数据关系、简化数据操作等。同时指出全局数据存在意外修改、别名问题等常见问题,也说明了使用全局数据的原因,如保存全局值等,还给出了降低使用全局数据风险的方法,如制定命名规范等。

Structures
1. Use structures to clarify data relationship.
2. Use structures to simplify operations on blocks of data.
3. Use sturctures to simplify parameter lists.
4. Use structures to reduce maintenance.

Global Data
Common problems with global data
1. Inadvertent changes to global data
2. Bizarre and exciting aliasing problems with global data.
3. Re-entrant code problems with global data.
4. Code reuse hindered by global data.
5. Uncertain initization-order issues with global data.
6. Modularity and intellectual manageability damaged by global data.

Reason to user global data
1. Preservation of global values.
2. Emulation of named constants.
3. Streamlining use of extremely common data.
4. Eliminating tramp data.

How to reduce the risks of using global data
1. Develop a naming convention that makes global varables obvious.
2. Create a well-annotated list of all your global variables.
3. Don't use global variables to contain intermediate results.
4. Don't pretend you're not using global data by putting all yoru data into a monster object and passing it everywhere

GetAudioOutputConfigurationOptions Description: This operation returns the available options (supported values and ranges for audio output configuration parameters) for configuring an audio output. SOAP action: http://www.onvif.org/ver20/media/wsdl/GetAudioOutputConfigurationOptions Input: [GetAudioOutputConfigurationOptions] ConfigurationToken - optional; [ReferenceToken] Token of the requested configuration. ProfileToken - optional; [ReferenceToken] Contains the token of an existing media profile the configurations shall be compatible with. Output: [GetAudioOutputConfigurationOptionsResponse] Options [AudioOutputConfigurationOptions] This message contains the audio output configuration options. If a audio output configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. OutputTokensAvailable - unbounded; [ReferenceToken] Tokens of the physical Audio outputs (typically one). SendPrimacyOptions - optional, unbounded; [anyURI] An audio channel MAY support different types of audio transmission. While for full duplex operation no special handling is required, in half duplex operation the transmission direction needs to be switched. The optional SendPrimacy parameter inside the AudioOutputConfiguration indicates which direction is currently active. An NVC can switch between different modes by setting the AudioOutputConfiguration. The following modes for the Send-Primacy are defined: www.onvif.org/ver20/HalfDuplex/Server The server is allowed to send audio data to the client. The client shall not send audio data via the backchannel to the NVT in this mode. www.onvif.org/ver20/HalfDuplex/Client The client is allowed to send audio data via the backchannel to the server. The NVT shall not send audio data to the client in this mode. www.onvif.org/ver20/HalfDuplex/Auto It is up to the device how to deal with sending and receiving audio data. Acoustic echo cancellation is out of ONVIF scope. OutputLevelRange [IntRange] Minimum and maximum level range supported for this Output. EQPresetScheduleSupport - optional; [boolean] Indicates whether EQPreset scheduling is supported. EQPresets - optional, unbounded; [EQPreset] List of supported EQPresets. Token [ReferenceToken] Unique identifier for the preset. Name [string] Preset name. (Readonly) isDefault [boolean] This indicates whether the EQ preset is designated as the default. When the scheduler is inactive, this preset will be applied. Only one preset can be set as the default among the EQ presets linked to an audio output. If all presets have isDefault set to false, the device may automatically select one preset as the default. ScheduleToken - optional; [string] Optional schedule token (if supported). isFrequencyDecibelEditable [boolean] Indicates whether the device allows changing the decibel level for frequencies. (Readonly) FrequencyDecibelPair - optional, unbounded; [FrequencyDecibelPair] List of frequency decibel pairs, each defined by a center frequency and its corresponding decibel value. CenterFrequency [int] The center frequency of the band in hertz (Readonly). For example, value of 1000 refers to 1kHz and 2000 refers to 2kHz. Decibel [float] Decibel value associated with the center frequency.解释接口
最新发布
10-30
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值