Add a vehicle data source to the instance.

        The Vehicle instance will be set as the callback of the source, and the
        source will be started if it is startable. (i.e. it has a ``start()``
        method).
192050
def add_source(self, source):
        
        if source is not None:
            self.sources.add(source)
            source.callback = self._receive
            if hasattr(source, 'start'):
                source.start()
565509
def add_callback(self, callback: _Callable, *args, **kwargs) -> None:
        
        self.loop.add_callback(callback, *args, **kwargs)
553193
def insert(self, context):
	
		
		
		status_code, msg = self.__endpoint.post(
			"/resources/custom-resource",
			data={
				"id": self.__name,
				"restype": self.__restype,
				"factoryclass": self.__factclass,
				"property": props_value(self.__props)
			}
		)
		self.__available = True
481153
def add(source):
    
    new_data = DatasetClient().add_data(source)
    print_data([DataClient().get(new_data['data_id'])])
281721
def add_self_source(self):
        
        return self.add_source(
            bibcode=self.catalog.OSC_BIBCODE,
            name=self.catalog.OSC_NAME,
            url=self.catalog.OSC_URL,
            secondary=True)
496684
void addDataSource(DataSource dataSource) {
		if (dataSource == null) return;
		this.dataSources.add(new DataSourceDefinition(dataSource.name(), dataSource.driverClass(), dataSource.url(), dataSource.username(), dataSource.password()));
	}
1100728
public void addInstance(String src,String id,String text) 
    {
        Instance inst = new Instance(src,id,text);
        ArrayList list = (ArrayList)sourceLists.get(src);
        if (list==null) {
            list = new ArrayList();
            sourceLists.put(src,list);
            sourceNames.add(src);
        }
        list.add(inst);
    }
1113581
def add_callback(self, callback=None, errorback=None):
        
        self._callback = callback
        self._errorback = errorback
1318099
def add(self, child):
        

        if isinstance(child, Run):
            self.add_run(child)
        elif isinstance(child, Record):
            self.add_record(child)
        elif isinstance(child, EventRecord):
            self.add_event_record(child)
        elif isinstance(child, DataDisplay):
            self.add_data_display(child)
        elif isinstance(child, DataWriter):
            self.add_data_writer(child)
        elif isinstance(child, EventWriter):
            self.add_event_writer(child)
        else:
            raise ModelError('Unsupported child element')
1127173
def add(self):
        '''
        '''
        # TODO validation per object type
        submit_attribs = {}
        for attrib in self.ATTRIBUTES:
            val = getattr(self, attrib, None)
            if val:
                submit_attribs[attrib] = val
        path = '/'.join([self.RESOURCE, 'add'])
        result = self.client.request(path, submit_attribs)
        return result
1315060
def add(options = {})
      self.options = options

      raise(ArgumentError, 'Mandatory param :name missing') unless options[:name]

      if options[:feature]
        features << options
        SafetyCone::ViewHelpers.add_method(options[:feature])
      else
        paths[make_key] = options
      end
    end
776367
def add_weatherdata(self, data):
        
        if not isinstance(data, WeatherData):
            raise ValueError('Weather data need to be of type WeatherData')
        self._data["WEATHER DATA"].append(data)
786995
def add_chassis(self, chassis):
        

        res = self._request(RestMethod.post, self.user_url, params={'ip': chassis.ip, 'port': chassis.port})
        assert(res.status_code == 201)
394771
async def add(self, *instances, using_db=None) -> None:
        
        if not instances:
            return
        if self.instance.id is None:
            raise OperationalError(
                "You should first call .save() on {model}".format(model=self.instance)
            )
        db = using_db if using_db else self.model._meta.db
        through_table = Table(self.field.through)
        select_query = (
            db.query_class.from_(through_table)
            .where(getattr(through_table, self.field.backward_key) == self.instance.id)
            .select(self.field.backward_key, self.field.forward_key)
        )
        query = db.query_class.into(through_table).columns(
            getattr(through_table, self.field.forward_key),
            getattr(through_table, self.field.backward_key),
        )

        if len(instances) == 1:
            criterion = getattr(through_table, self.field.forward_key) == instances[0].id
        else:
            criterion = getattr(through_table, self.field.forward_key).isin(
                [i.id for i in instances]
            )

        select_query = select_query.where(criterion)

        already_existing_relations_raw = await db.execute_query(str(select_query))
        already_existing_relations = {
            (r[self.field.backward_key], r[self.field.forward_key])
            for r in already_existing_relations_raw
        }

        insert_is_required = False
        for instance_to_add in instances:
            if instance_to_add.id is None:
                raise OperationalError(
                    "You should first call .save() on {model}".format(model=instance_to_add)
                )
            if (self.instance.id, instance_to_add.id) in already_existing_relations:
                continue
            query = query.insert(instance_to_add.id, self.instance.id)
            insert_is_required = True
        if insert_is_required:
            await db.execute_query(str(query))
1286915
def addDataset(self, dataset):
        
        id_ = dataset.getId()
        self._datasetIdMap[id_] = dataset
        self._datasetNameMap[dataset.getLocalId()] = dataset
        self._datasetIds.append(id_)
1081722
def AddService(self, new_service):
    
    for service in self._services:
      if new_service == service:
        # If this service is the same as one we already know about, we
        # just want to add where it came from.
        service.sources.append(new_service.sources[0])
        return

    # We only add a new object to our list if we don't have
    # an identical one already.
    self._services.append(new_service)
1276627
def add_source(self, url, *, note=''):
        
        new = {'url': url, 'note': note}
        self.sources.append(new)