net.datenstrudel.bulbs:bulbs-shared

This is a supporting lib for the main project Bulbs_Core at https://github.com/datenstrudel/bulbs-core

License

License

Categories

Categories

Net
GroupId

GroupId

net.datenstrudel.bulbs
ArtifactId

ArtifactId

bulbs-shared
Last Version

Last Version

1.2
Release Date

Release Date

Type

Type

jar
Description

Description

net.datenstrudel.bulbs:bulbs-shared
This is a supporting lib for the main project Bulbs_Core at https://github.com/datenstrudel/bulbs-core
Project URL

Project URL

https://github.com/datenstrudel/bulbs-shared/
Source Code Management

Source Code Management

https://github.com/datenstrudel/bulbs-shared.git

Download bulbs-shared

How to add to project

<!-- https://jarcasting.com/artifacts/net.datenstrudel.bulbs/bulbs-shared/ -->
<dependency>
    <groupId>net.datenstrudel.bulbs</groupId>
    <artifactId>bulbs-shared</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.datenstrudel.bulbs/bulbs-shared/
implementation 'net.datenstrudel.bulbs:bulbs-shared:1.2'
// https://jarcasting.com/artifacts/net.datenstrudel.bulbs/bulbs-shared/
implementation ("net.datenstrudel.bulbs:bulbs-shared:1.2")
'net.datenstrudel.bulbs:bulbs-shared:jar:1.2'
<dependency org="net.datenstrudel.bulbs" name="bulbs-shared" rev="1.2">
  <artifact name="bulbs-shared" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.datenstrudel.bulbs', module='bulbs-shared', version='1.2')
)
libraryDependencies += "net.datenstrudel.bulbs" % "bulbs-shared" % "1.2"
[net.datenstrudel.bulbs/bulbs-shared "1.2"]

Dependencies

compile (5)

Group / Artifact Type Version
org.quartz-scheduler : quartz jar 2.2.0
com.google.code.gson : gson jar 2.2.4
com.google.guava : guava jar 14.0.1
com.mangofactory : swagger-springmvc jar 0.8.8
ch.qos.logback : logback-classic jar 1.1.2

provided (1)

Group / Artifact Type Version
javax.validation : validation-api jar 1.1.0.Final

test (3)

Group / Artifact Type Version
junit : junit jar 4.10
org.hamcrest : hamcrest-core jar 1.3
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

Build Status

Bulbs-Shared

This is a supporting lib for the main project Bulbs_Core.

It contains shared types/tools that can be used for development of client apps.

The classes located in package net.datenstrudel.bulbs.shared.domaín.model.* can be used within applications built on top of this library. They provide domain data as well as some operations/algorithms to "speak the language" of light control. For example there is an abstraction of colors, given as the abstract class Color as well as some implementations (e.g. ColorHSB). These colors could be used in commands to be sent against the bulbs-core module, deployed somewhere else, in order to apply these to actual hardware illuminants. The logic of how colors are applied to which illuminants at which time to which concrete hardware is up to your application.

Currently this module just contains the data/classes whose direct json representations can be sent to the RESTful endpoints provided by bulbs-core. A RESTful client interfacte, propably based on Spring's RestTemplate is still missing and must be implemented.

While classes within the package net.datenstrudel.bulbs.shared.domaín.model.* are shared between the core module and other applications, the classes within the package net.datenstrudel.bulbs.shared.domaín.model.client.* are intended to be used by client applications only.

Main Domain Classes

As mentioned, JSON representations of the classes in net.datenstrudel.bulbs.shared.domaín.model.client.* are 100% compatible with the RESTful API of bulbs-core. The sub packages are sub-divided by domain concerns/ contexts. Thus we have a package ..client.bulb for direct illuminant control commands as well as a gateway representation (DtoBulbBridge). Moreover there is an identity context for identity and authentication concerns, containing a user abstracting class.

Most interestingly you find the Dto*Cmd classes, representing commands that can be sent against the core module. With these commands you can express the actual light behavior your application has determined to be applied. The following command classes currently exist:

  • DtoBulbActuationCmd allows you to directly control specific, single illuminants. Can contain many BulbStates in order to realize state transitions over time.
  • DtoGroupActuatorCmd allows you to control groupings of illuminants, that must have been created before as DtoGroups
  • DtoPresetActuatorCmd allows you to trigger specific presets that must have been created before as DtoPresets

Illuminants are represented as Bulbs. Moreover you can create schedules using DtoScheduledActuation classes.

.. more documentation will follow soon..

Versions

Version
1.2
1.1
1.0