19.1.14. camcops_server.cc_modules.cc_device


Copyright (C) 2012-2018 Rudolf Cardinal (rudolf@pobox.com).

This file is part of CamCOPS.

CamCOPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

CamCOPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with CamCOPS. If not, see <http://www.gnu.org/licenses/>.


class camcops_server.cc_modules.cc_device.Device(**kwargs)[source]

Represents a tablet device.

get_friendly_name() → str[source]

Get device friendly name (or failing that, device name).

get_friendly_name_and_id() → str[source]

Get device ID with friendly name (or failing that, device name).

get_id() → int[source]

Get device ID.

is_valid() → bool[source]

Valid device (having been instantiated with Device(device_id), i.e. is it in the database?

class camcops_server.cc_modules.cc_device.DeviceReport[source]

Report to show registered devices. This is a superuser-only report, so we do not override superuser_only.

get_query(req: CamcopsRequest) → sqlalchemy.orm.query.Query[source]

Return the Select statement to execute the report. Must override. Parameters are passed in via the Request.

class camcops_server.cc_modules.cc_device.DeviceTests(methodName='runTest')[source]