コード例 #1
0
bool SoundflowerDevice::initHardware(IOService *provider)
{
    bool result = false;

    if (!super::initHardware(provider))
        goto Done;

    setDeviceName("WavTap");
    setDeviceShortName("WavTap");
    setManufacturerName("WavTap");

    if (!createAudioEngines())
        goto Done;

    result = true;

Done:

    return result;
}
コード例 #2
0
ファイル: qhy_ccd.cpp プロジェクト: rrogge/indi
QHYCCD::QHYCCD(const char *name) : FilterInterface(this)
{
    // Filter Limits, can we call QHY API to find filter maximum?
    FilterSlotN[0].min = 1;
    FilterSlotN[0].max = 5;

    HasUSBTraffic = false;
    HasUSBSpeed   = false;
    HasGain       = false;
    HasOffset     = false;
    HasFilters    = false;
    coolerEnabled = false;

    snprintf(this->name, MAXINDINAME, "QHY CCD %.15s", name);
    snprintf(this->camid, MAXINDINAME, "%s", name);
    setDeviceName(this->name);

    setVersion(INDI_QHY_VERSION_MAJOR, INDI_QHY_VERSION_MINOR);

    sim = false;
}
コード例 #3
0
ファイル: indi_fishcamp.cpp プロジェクト: azwing/indi
FishCampCCD::FishCampCCD(int CamNum)
{
    cameraNum = CamNum;

    int rc = fcUsb_OpenCamera(cameraNum);

    IDLog("fcUsb_OpenCamera opening cam #%d, returns %d\n", cameraNum, rc);

    rc = fcUsb_cmd_getinfo(cameraNum, &camInfo);

    IDLog("fcUsb_cmd_getinfo opening cam #%d, returns %d\n", cameraNum, rc);

    strncpy(name, (char *)&camInfo.camNameStr, MAXINDINAME);

    IDLog("Cam #%d with name %s\n", cameraNum, name);

    setDeviceName(name);

    setVersion(FISHCAMP_VERSION_MAJOR, FISHCAMP_VERSION_MINOR);

    sim = false;
}
コード例 #4
0
bool SoundflowerDevice::initHardware(IOService *provider)
{
    bool result = false;
    
	//IOLog("SoundflowerDevice[%p]::initHardware(%p)\n", this, provider);
    
    if (!super::initHardware(provider))
        goto Done;
    
    setDeviceName("Soundflower");
    setDeviceShortName("Soundflower");
    setManufacturerName("ma++ ingalls for Cycling '74");
    
    if (!createAudioEngines())
        goto Done;
    
    result = true;
    
Done:

    return result;
}
コード例 #5
0
bool MixlrAudioDevice::initHardware(IOService *provider)
{
    bool result = false;
    
	//IOLog("MixlrAudioDevice[%p]::initHardware(%p)\n", this, provider);
    
    if (!super::initHardware(provider))
        goto Done;
    
    setDeviceName("Mixlr");
    setDeviceShortName("Mixlr");
    setManufacturerName("Mixlr");
    
    if (!createAudioEngines())
        goto Done;
    
    result = true;
    
Done:

    return result;
}
コード例 #6
0
ファイル: asi_ccd.cpp プロジェクト: seanhoughton/indi
ASICCD::ASICCD(ASI_CAMERA_INFO *camInfo)
{
  setVersion(ASI_VERSION_MAJOR, ASI_VERSION_MINOR);
  ControlN = NULL;
  ControlS  = NULL;
  pControlCaps = NULL;
  m_camInfo = camInfo;

  exposureRetries = 0;
  streamPredicate = 0;
  terminateThread = false;

  InWEPulse = InNSPulse = false;
  WEPulseRequest = NSPulseRequest =0;
  WEtimerID = NStimerID = 0;
  WEDir = NSDir = ASI_GUIDE_NORTH;

  TemperatureUpdateCounter = 0;

  snprintf(this->name, MAXINDIDEVICE, "ZWO CCD %s", m_camInfo->Name+4);
  setDeviceName(this->name);

}
コード例 #7
0
ファイル: bulkcontroller.cpp プロジェクト: MLudgate/mixxx
BulkController::BulkController(libusb_context* context,
                               libusb_device_handle *handle,
                               struct libusb_device_descriptor *desc)
        : m_context(context),
          m_phandle(handle),
          in_epaddr(0),
          out_epaddr(0)
{
    vendor_id = desc->idVendor;
    product_id = desc->idProduct;

    manufacturer = get_string(handle, desc->iManufacturer);
    product = get_string(handle, desc->iProduct);
    m_sUID = get_string(handle, desc->iSerialNumber);

    setDeviceCategory(tr("USB Controller"));

    setDeviceName(QString("%1 %2").arg(product).arg(m_sUID));

    setInputDevice(true);
    setOutputDevice(true);
    m_pReader = NULL;
}
コード例 #8
0
ULaserDevice::ULaserDevice()
{
  verbose = false;
  threadStop = true;
  threadRunning = false;
  datalogInterval = 0;
  datalogUsedScans = false;
  datalogSeq = 0;
  angleResolution = 1.0;
  modeAngleScan = 180;
  modeSimulated = false;
  statGoodCnt = 0;
  statBadCnt = 0;
  statMsgRate = 0.0;
  // set default device
  setDeviceName("/dev/ttyS4");
  //setDeviceName("/dev/ttyS0");
  sendNewData = false;
  sendStrCnt = 0;
  loopCnt = 0;
//  repeatGetScan = true; //false;
  serial = 0;
  mirrorData = false;
//   fakeState = 0;
//   fakePose.clear();
  maxValidRange = 80.0;
  pushData = NULL;
  vars = NULL;
  var.name = NULL;
  var.type = NULL;
  var.serial = NULL;
  var.scanwidth = NULL;
  var.scanres = NULL;
  var.maxRange = NULL;
  var.scanDelay = NULL;
}
コード例 #9
0
ファイル: detector_simulator.cpp プロジェクト: azwing/indi
RadioSim::RadioSim()
{
    InCapture = false;
    DishSize = 5;
    setDeviceName(getDefaultName());
}
コード例 #10
0
ファイル: quantum_wheel.cpp プロジェクト: djibb/indi
QFW::QFW()
{
    setDeviceName(QFW::getDefaultName());
    setVersion(VERSION_MAJOR, VERSION_MINOR);
    setFilterConnection(CONNECTION_SERIAL | CONNECTION_TCP);
}
コード例 #11
0
ファイル: AC97AudioDriver.cpp プロジェクト: OTiZ/osx
bool AppleIntelAC97AudioDriver::initHardware( IOService * provider )
{
    DebugLog("%s::%s(%p)\n", getName(), __FUNCTION__, provider);

    if ( super::initHardware(provider) == false )
    {
        IOLog("super::initHardware\n");
        goto fail;
    }

    setManufacturerName( "Intel" );
    setDeviceName( "AC97 Audio Controller" );

    // Keep a reference to our provider. Must be an audio codec.

    _audioCodec = OSDynamicCast( AppleIntelAC97Codec, provider );
    if ( _audioCodec == 0 )
    {
        goto fail;
    }

    // Open codec for exclusive access.

    if ( _audioCodec->open( this ) == false )
    {
        DebugLog("%s: codec open error\n", getName());
        goto fail;
    }

    // Create audio engine.

    if ( createAudioEngine() == false )
    {
        DebugLog("%s: createAudioEngine() error\n", getName());
        goto fail;
    }

    // Create audio ports, and attach them to audio engine.

    if ( createAudioPorts() == false )
    {
        DebugLog("%s: createAudioPorts() error\n", getName());
        goto fail;
    }

    // Activate audio engine.

    if ( activateAudioEngine( _audioEngine ) != kIOReturnSuccess )
    {
        DebugLog("%s: activateAudioEngine() error\n", getName());
        goto fail;
    }

    // Flush default audio control settings.

    flushAudioControls();

    return true;

fail:
    if ( _audioCodec )
    {
        _audioCodec->close( this );
        _audioCodec = 0;
    }

    return false;
}
コード例 #12
0
ファイル: fan.cpp プロジェクト: rootming/AutoCar
Fan::Fan(int speed, int range): proSpeed(speed),
                            proRange(range)
{
    setDeviceName("Coolers Fan");
    setDeviceType(MOTOR);
}
コード例 #13
0
ファイル: temperature.cpp プロジェクト: rootming/AutoCar
Temperature::Temperature()
{
    setDeviceName("Temperature Sensor");
    setDeviceType(SENSOR);
    setAddr(ADC_BG_ADDRESS);
}