SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <airspyinput.h>
Classes | |
class | MsgConfigureAirspy |
class | MsgFileRecord |
class | MsgStartStop |
Public Member Functions | |
AirspyInput (DeviceAPI *deviceAPI) | |
virtual | ~AirspyInput () |
virtual void | destroy () |
virtual void | init () |
initializations to be done when all collaborating objects are created and possibly connected More... | |
virtual bool | start () |
virtual void | stop () |
virtual QByteArray | serialize () const |
virtual bool | deserialize (const QByteArray &data) |
virtual void | setMessageQueueToGUI (MessageQueue *queue) |
virtual const QString & | getDeviceDescription () const |
virtual int | getSampleRate () const |
Sample rate exposed by the source. More... | |
virtual void | setSampleRate (int sampleRate) |
For when the source sample rate is set externally. More... | |
virtual quint64 | getCenterFrequency () const |
Center frequency exposed by the source. More... | |
virtual void | setCenterFrequency (qint64 centerFrequency) |
const std::vector< uint32_t > & | getSampleRates () const |
virtual bool | handleMessage (const Message &message) |
virtual int | webapiSettingsGet (SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiSettingsPutPatch (bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
virtual int | webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
Public Member Functions inherited from DeviceSampleSource | |
DeviceSampleSource () | |
virtual | ~DeviceSampleSource () |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
SampleSinkFifo * | getSampleFifo () |
Static Public Attributes | |
static const qint64 | loLowLimitFreq = 24000000L |
static const qint64 | loHighLimitFreq = 1900000000L |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
bool | openDevice () |
void | closeDevice () |
bool | applySettings (const AirspySettings &settings, bool force) |
struct airspy_device * | open_airspy_from_sequence (int sequence) |
void | setDeviceCenterFrequency (quint64 freq) |
void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const AirspySettings &settings) |
void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) |
void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const AirspySettings &settings, bool force) |
void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
QMutex | m_mutex |
AirspySettings | m_settings |
struct airspy_device * | m_dev |
AirspyThread * | m_airspyThread |
QString | m_deviceDescription |
std::vector< uint32_t > | m_sampleRates |
bool | m_running |
FileRecord * | m_fileSink |
File sink to record device I/Q output. More... | |
QNetworkAccessManager * | m_networkManager |
QNetworkRequest | m_networkRequest |
Additional Inherited Members | |
Public Types inherited from DeviceSampleSource | |
enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
enum | FrequencyShiftScheme { FSHIFT_STD = 0, FSHIFT_TXSYNC } |
Static Public Member Functions inherited from DeviceSampleSource | |
static qint64 | calculateDeviceCenterFrequency (quint64 centerFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) |
static qint64 | calculateCenterFrequency (quint64 deviceCenterFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) |
static qint32 | calculateFrequencyShift (int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme) |
Protected Slots inherited from DeviceSampleSource | |
void | handleInputMessages () |
Protected Attributes inherited from DeviceSampleSource | |
SampleSinkFifo | m_sampleFifo |
MessageQueue | m_inputMessageQueue |
Input queue to the source. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
Definition at line 35 of file airspyinput.h.
AirspyInput::AirspyInput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 48 of file airspyinput.cpp.
References DeviceAPI::addAncillarySink(), arg(), DeviceAPI::getDeviceUID(), m_deviceAPI, m_fileSink, m_networkManager, networkManagerFinished(), openDevice(), and DeviceAPI::setNbSourceStreams().
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
virtual |
Definition at line 65 of file airspyinput.cpp.
References closeDevice(), m_deviceAPI, m_fileSink, m_networkManager, m_running, networkManagerFinished(), DeviceAPI::removeAncillarySink(), and stop().
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
private |
Definition at line 366 of file airspyinput.cpp.
References DeviceSampleSource::calculateDeviceCenterFrequency(), DeviceAPI::configureCorrections(), DeviceAPI::getDeviceEngineInputMessageQueue(), FileRecord::handleMessage(), m_airspyThread, AirspySettings::m_biasT, AirspySettings::m_centerFrequency, AirspySettings::m_dcBlock, m_dev, m_deviceAPI, AirspySettings::m_devSampleRateIndex, AirspySettings::m_fcPos, m_fileSink, AirspySettings::m_iqCorrection, AirspySettings::m_lnaAGC, AirspySettings::m_lnaGain, AirspySettings::m_log2Decim, AirspySettings::m_LOppmTenths, AirspySettings::m_mixerAGC, AirspySettings::m_mixerGain, m_mutex, AirspySettings::m_reverseAPIAddress, AirspySettings::m_reverseAPIDeviceIndex, AirspySettings::m_reverseAPIPort, m_sampleRates, m_settings, AirspySettings::m_transverterDeltaFrequency, AirspySettings::m_transverterMode, AirspySettings::m_useReverseAPI, AirspySettings::m_vgaGain, MessageQueue::push(), setDeviceCenterFrequency(), AirspyThread::setFcPos(), AirspyThread::setLog2Decimation(), AirspyThread::setSamplerate(), and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
|
private |
Definition at line 196 of file airspyinput.cpp.
References m_dev, and m_deviceDescription.
Referenced by openDevice(), and ~AirspyInput().
|
virtual |
Implements DeviceSampleSource.
Definition at line 229 of file airspyinput.cpp.
References AirspyInput::MsgConfigureAirspy::create(), AirspySettings::deserialize(), DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and AirspySettings::resetToDefaults().
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 79 of file airspyinput.cpp.
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
virtual |
Center frequency exposed by the source.
Implements DeviceSampleSource.
Definition at line 262 of file airspyinput.cpp.
References AirspySettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
|
virtual |
Implements DeviceSampleSource.
Definition at line 251 of file airspyinput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
|
virtual |
Sample rate exposed by the source.
Implements DeviceSampleSource.
Definition at line 256 of file airspyinput.cpp.
References AirspySettings::m_devSampleRateIndex, AirspySettings::m_log2Decim, m_sampleRates, and m_settings.
Referenced by setMessageQueueToGUI().
|
inline |
Definition at line 116 of file airspyinput.h.
References handleMessage(), m_sampleRates, webapiReportGet(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
Referenced by webapiFormatDeviceReport().
|
virtual |
Implements DeviceSampleSource.
Definition at line 282 of file airspyinput.cpp.
References applySettings(), FileRecord::genUniqueFileName(), DeviceAPI::getDeviceUID(), AirspyInput::MsgConfigureAirspy::getForce(), AirspyInput::MsgConfigureAirspy::getSettings(), AirspyInput::MsgFileRecord::getStartStop(), AirspyInput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), m_deviceAPI, AirspySettings::m_fileRecordName, m_fileSink, m_settings, AirspySettings::m_useReverseAPI, Message::match(), FileRecord::setFileName(), DeviceAPI::startDeviceEngine(), FileRecord::startRecording(), DeviceAPI::stopDeviceEngine(), FileRecord::stopRecording(), and webapiReverseSendStartStop().
Referenced by getSampleRates().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSource.
Definition at line 164 of file airspyinput.cpp.
References applySettings(), and m_settings.
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
privateslot |
Definition at line 900 of file airspyinput.cpp.
Referenced by AirspyInput(), and ~AirspyInput().
|
private |
Definition at line 586 of file airspyinput.cpp.
References i, and AirspyPlugin::m_maxDevices.
Referenced by openDevice().
|
private |
Definition at line 84 of file airspyinput.cpp.
References closeDevice(), DeviceAPI::getSamplingDeviceSequence(), i, m_dev, m_deviceAPI, DeviceSampleSource::m_sampleFifo, m_sampleRates, open_airspy_from_sequence(), and SampleSinkFifo::setSize().
Referenced by AirspyInput().
|
virtual |
Implements DeviceSampleSource.
Definition at line 224 of file airspyinput.cpp.
References m_settings, and AirspySettings::serialize().
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 267 of file airspyinput.cpp.
References AirspyInput::MsgConfigureAirspy::create(), AirspySettings::m_centerFrequency, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
|
private |
Definition at line 349 of file airspyinput.cpp.
References m_dev, AirspySettings::m_LOppmTenths, and m_settings.
Referenced by applySettings().
|
inlinevirtual |
Implements DeviceSampleSource.
Definition at line 110 of file airspyinput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSource::m_guiMessageQueue.
|
inlinevirtual |
For when the source sample rate is set externally.
Implements DeviceSampleSource.
Definition at line 113 of file airspyinput.h.
References getCenterFrequency(), and setCenterFrequency().
|
virtual |
Implements DeviceSampleSource.
Definition at line 169 of file airspyinput.cpp.
References applySettings(), m_airspyThread, m_dev, AirspySettings::m_devSampleRateIndex, AirspySettings::m_fcPos, AirspySettings::m_log2Decim, m_mutex, m_running, DeviceSampleSource::m_sampleFifo, m_sampleRates, m_settings, AirspyThread::setFcPos(), AirspyThread::setLog2Decimation(), AirspyThread::setSamplerate(), AirspyThread::startWork(), and stop().
Referenced by AirspyInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 209 of file airspyinput.cpp.
References m_airspyThread, m_mutex, m_running, and AirspyThread::stopWork().
Referenced by AirspyInput::MsgStartStop::MsgStartStop(), start(), and ~AirspyInput().
|
private |
Definition at line 783 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceReport::getAirspyReport(), SWGSDRangel::SWGAirspyReport::getSampleRates(), getSampleRates(), and SWGSDRangel::SWGAirspyReport::setSampleRates().
Referenced by webapiReportGet().
|
private |
Definition at line 747 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getAirspySettings(), SWGSDRangel::SWGAirspySettings::getFileRecordName(), SWGSDRangel::SWGAirspySettings::getReverseApiAddress(), AirspySettings::m_biasT, AirspySettings::m_centerFrequency, AirspySettings::m_dcBlock, AirspySettings::m_devSampleRateIndex, AirspySettings::m_fcPos, AirspySettings::m_fileRecordName, AirspySettings::m_iqCorrection, AirspySettings::m_lnaAGC, AirspySettings::m_lnaGain, AirspySettings::m_log2Decim, AirspySettings::m_LOppmTenths, AirspySettings::m_mixerAGC, AirspySettings::m_mixerGain, AirspySettings::m_reverseAPIAddress, AirspySettings::m_reverseAPIDeviceIndex, AirspySettings::m_reverseAPIPort, AirspySettings::m_transverterDeltaFrequency, AirspySettings::m_transverterMode, AirspySettings::m_useReverseAPI, AirspySettings::m_vgaGain, SWGSDRangel::SWGAirspySettings::setBiasT(), SWGSDRangel::SWGAirspySettings::setCenterFrequency(), SWGSDRangel::SWGAirspySettings::setDcBlock(), SWGSDRangel::SWGAirspySettings::setDevSampleRateIndex(), SWGSDRangel::SWGAirspySettings::setFcPos(), SWGSDRangel::SWGAirspySettings::setFileRecordName(), SWGSDRangel::SWGAirspySettings::setIqCorrection(), SWGSDRangel::SWGAirspySettings::setLnaAgc(), SWGSDRangel::SWGAirspySettings::setLnaGain(), SWGSDRangel::SWGAirspySettings::setLog2Decim(), SWGSDRangel::SWGAirspySettings::setLOppmTenths(), SWGSDRangel::SWGAirspySettings::setMixerAgc(), SWGSDRangel::SWGAirspySettings::setMixerGain(), SWGSDRangel::SWGAirspySettings::setReverseApiAddress(), SWGSDRangel::SWGAirspySettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGAirspySettings::setReverseApiPort(), SWGSDRangel::SWGAirspySettings::setTransverterDeltaFrequency(), SWGSDRangel::SWGAirspySettings::setTransverterMode(), SWGSDRangel::SWGAirspySettings::setUseReverseApi(), and SWGSDRangel::SWGAirspySettings::setVgaGain().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 736 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceReport::getAirspyReport(), SWGSDRangel::SWGAirspyReport::init(), SWGSDRangel::SWGDeviceReport::setAirspyReport(), and webapiFormatDeviceReport().
Referenced by getSampleRates().
|
private |
Definition at line 794 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), SWGSDRangel::SWGDeviceSettings::getAirspySettings(), DeviceAPI::getDeviceSetIndex(), AirspySettings::m_biasT, AirspySettings::m_centerFrequency, AirspySettings::m_dcBlock, m_deviceAPI, AirspySettings::m_devSampleRateIndex, AirspySettings::m_fcPos, AirspySettings::m_fileRecordName, AirspySettings::m_iqCorrection, AirspySettings::m_lnaAGC, AirspySettings::m_lnaGain, AirspySettings::m_log2Decim, AirspySettings::m_LOppmTenths, AirspySettings::m_mixerAGC, AirspySettings::m_mixerGain, m_networkManager, m_networkRequest, AirspySettings::m_reverseAPIAddress, AirspySettings::m_reverseAPIDeviceIndex, AirspySettings::m_reverseAPIPort, AirspySettings::m_transverterDeltaFrequency, AirspySettings::m_transverterMode, AirspySettings::m_vgaGain, SWGSDRangel::SWGDeviceSettings::setAirspySettings(), SWGSDRangel::SWGAirspySettings::setBiasT(), SWGSDRangel::SWGAirspySettings::setCenterFrequency(), SWGSDRangel::SWGAirspySettings::setDcBlock(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGAirspySettings::setDevSampleRateIndex(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGAirspySettings::setFcPos(), SWGSDRangel::SWGAirspySettings::setFileRecordName(), SWGSDRangel::SWGAirspySettings::setIqCorrection(), SWGSDRangel::SWGAirspySettings::setLnaAgc(), SWGSDRangel::SWGAirspySettings::setLnaGain(), SWGSDRangel::SWGAirspySettings::setLog2Decim(), SWGSDRangel::SWGAirspySettings::setLOppmTenths(), SWGSDRangel::SWGAirspySettings::setMixerAgc(), SWGSDRangel::SWGAirspySettings::setMixerGain(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), SWGSDRangel::SWGAirspySettings::setTransverterDeltaFrequency(), SWGSDRangel::SWGAirspySettings::setTransverterMode(), and SWGSDRangel::SWGAirspySettings::setVgaGain().
Referenced by applySettings().
|
private |
Definition at line 872 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, AirspySettings::m_reverseAPIAddress, AirspySettings::m_reverseAPIDeviceIndex, AirspySettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 621 of file airspyinput.cpp.
References AirspyInput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, and MessageQueue::push().
Referenced by getSampleRates().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 612 of file airspyinput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by getSampleRates().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 640 of file airspyinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getAirspySettings(), SWGSDRangel::SWGAirspySettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setAirspySettings(), and webapiFormatDeviceSettings().
Referenced by getSampleRates().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 651 of file airspyinput.cpp.
References AirspyInput::MsgConfigureAirspy::create(), SWGSDRangel::SWGDeviceSettings::getAirspySettings(), SWGSDRangel::SWGAirspySettings::getBiasT(), SWGSDRangel::SWGAirspySettings::getCenterFrequency(), SWGSDRangel::SWGAirspySettings::getDcBlock(), SWGSDRangel::SWGAirspySettings::getDevSampleRateIndex(), SWGSDRangel::SWGAirspySettings::getFcPos(), SWGSDRangel::SWGAirspySettings::getFileRecordName(), SWGSDRangel::SWGAirspySettings::getIqCorrection(), SWGSDRangel::SWGAirspySettings::getLnaAgc(), SWGSDRangel::SWGAirspySettings::getLnaGain(), SWGSDRangel::SWGAirspySettings::getLog2Decim(), SWGSDRangel::SWGAirspySettings::getLOppmTenths(), SWGSDRangel::SWGAirspySettings::getMixerAgc(), SWGSDRangel::SWGAirspySettings::getMixerGain(), SWGSDRangel::SWGAirspySettings::getReverseApiAddress(), SWGSDRangel::SWGAirspySettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGAirspySettings::getReverseApiPort(), SWGSDRangel::SWGAirspySettings::getTransverterDeltaFrequency(), SWGSDRangel::SWGAirspySettings::getTransverterMode(), SWGSDRangel::SWGAirspySettings::getUseReverseApi(), SWGSDRangel::SWGAirspySettings::getVgaGain(), AirspySettings::m_biasT, AirspySettings::m_centerFrequency, AirspySettings::m_dcBlock, AirspySettings::m_devSampleRateIndex, AirspySettings::m_fcPos, AirspySettings::m_fileRecordName, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, AirspySettings::m_iqCorrection, AirspySettings::m_lnaAGC, AirspySettings::m_lnaGain, AirspySettings::m_log2Decim, AirspySettings::m_LOppmTenths, AirspySettings::m_mixerAGC, AirspySettings::m_mixerGain, AirspySettings::m_reverseAPIAddress, AirspySettings::m_reverseAPIDeviceIndex, AirspySettings::m_reverseAPIPort, m_settings, AirspySettings::m_transverterDeltaFrequency, AirspySettings::m_transverterMode, AirspySettings::m_useReverseAPI, AirspySettings::m_vgaGain, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by getSampleRates().
|
static |
Definition at line 144 of file airspyinput.h.
Referenced by AirspyGui::updateFrequencyLimits().
|
static |
Definition at line 143 of file airspyinput.h.
Referenced by AirspyGui::updateFrequencyLimits().
|
private |
Definition at line 151 of file airspyinput.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 150 of file airspyinput.h.
Referenced by applySettings(), closeDevice(), openDevice(), setDeviceCenterFrequency(), and start().
|
private |
Definition at line 147 of file airspyinput.h.
Referenced by AirspyInput(), applySettings(), handleMessage(), openDevice(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~AirspyInput().
|
private |
Definition at line 152 of file airspyinput.h.
Referenced by closeDevice(), and getDeviceDescription().
|
private |
File sink to record device I/Q output.
Definition at line 155 of file airspyinput.h.
Referenced by AirspyInput(), applySettings(), handleMessage(), and ~AirspyInput().
|
private |
Definition at line 148 of file airspyinput.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 156 of file airspyinput.h.
Referenced by AirspyInput(), webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~AirspyInput().
|
private |
Definition at line 157 of file airspyinput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 154 of file airspyinput.h.
Referenced by start(), stop(), and ~AirspyInput().
|
private |
Definition at line 153 of file airspyinput.h.
Referenced by applySettings(), getSampleRate(), getSampleRates(), openDevice(), and start().
|
private |
Definition at line 149 of file airspyinput.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), getSampleRate(), handleMessage(), init(), serialize(), setCenterFrequency(), setDeviceCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().