Class Diagram for iot
2018-08-19 18:00:43 7 举报
物联网(IoT)类图是一种用于描述物联网系统结构和组件之间关系的图形表示。它包括各种实体,如传感器、执行器、控制器和用户界面等。这些实体通过消息传递相互通信,以实现数据的收集、处理和控制。类图中的箭头表示数据流和控制流,而类之间的连线表示它们之间的关系,如继承、关联和依赖等。物联网类图有助于分析和设计复杂的物联网系统,以确保各个组件能够协同工作,实现预期的功能。
作者其他创作
大纲/内容
DeviceManager
- deviceList: List-connector: DatabaseConnector-controller: DeviceController
+ getDevice(int): Device+ addDevice(Device): int+ deleteDevice(Device): int+ updateDevice(Device): int
AirConditioner
- temperature: float- humidity: float
+ setTemperature(float): void+ setHumidity(float): void
ParseRule
- tragetDevType: int- userCmdType: Int- toDoDevType: int- devCmdType: int- rule: Expression
+ calculate(int): float
《singleton》DatabaseConnector
+ dbIP : String
+ getUser(int): User+ getDevice(int): Device+ getAllDevices(): List+getRule(Device): Rule
PortConnector
BluetoothConnector
UserManager
- connector:DatabaseConnector
+logIn(User): int+logOut(User): void- verifyUser(User): int
Connector
+ connect(): int+ disconnect(): int+ read(): Byte[]+ write(Byte[]): int
HttpConnector
Device
- id: Int- type: Int- connectType: Int- macAddress: String
+ connect(): int+ disconnect(): int+ turnOn(): void+ turnOff(): void
Light
- brightness: int
+ setBrightness(int) : void
WashingMachine
+ soakingTime: int+ washingTime: int+ rinsingTime: int+ dryingTIme:int+ currentStage: int
+ soak(): void+ wash(): void+ rinse(): void+ dry(): void
User
- id: Int+ username: String+ password: String
+ logIn(): int+ logOut();
DeviceController
+ connectDevice(Device): int+ disconnectDevice(Device): int+ getDeviceData(Device): Device+ sendCommand(DeviceCommand):int
ZigBeeConnector
《singleton》System
-userManager: UserManager-deviceManager: DeviceManger-commandManager: CommandManager
+ startup() :void+ shutdown() :void+ maintian() :void
Television
- channel: int- volume: int- brightness: int
+ setChannel(int): void+ setVolume(int): void+ setBrightness(int): void
CommandManager
-controller: DeviceController
- parse(UserCommand): List+ controlDevice(UserCommand): int+ getDeviceData(Device): Device
DeviceCommand
- time: TimeStamp+targetDevice: Device+commandType: int+parameter: float
+ execute(): int+ record(): int
UserCommand
- time: TimeStamp+targetDevice: Device+commandType: int+parameter: int
0 条评论
下一页