-
-
Notifications
You must be signed in to change notification settings - Fork 26
Do the Additions outweigh the mess? #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
d8ahazard
wants to merge
37
commits into
dotMorten:master
Choose a base branch
from
d8ahazard:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
50f43e1
Update gitignore
d8ahazard a7c0ae8
Refactor "Color" to "LifxColor" to avoid constant confusion with syst…
d8ahazard 6295e08
Add state extended color zones message response...
d8ahazard 820be00
Add multizone partial class
d8ahazard 279c3ff
Code cleanup!
d8ahazard dafc945
Add remainder of multi-zone messages
d8ahazard 1e46c28
Add "ToBytes()" for LifxColor
d8ahazard 01ded40
Allow direct serialization of Colors to payload using LifxColor.ToByt…
d8ahazard 2d26ba5
Type adjustments, code cleanup
d8ahazard 5c18611
Massive Updates
d8ahazard ebd98ca
Cleanup, fixes, add remaining device "stuff".
d8ahazard a95448c
Re-rename methods...
d8ahazard cc3c82c
Add remaining missing messages
d8ahazard 6946648
Fix return type for GetColorZonesAsync
d8ahazard 7c791c4
Update net core test app to enumerate device-specific info
d8ahazard 7cd6aba
Use generic device for tile/switch/multizone ops, not "bulb".
d8ahazard 0578c00
Update documentation
d8ahazard e169159
Update logging in sampleapp, fix device calls
d8ahazard aeea25f
Fix Multizone request
d8ahazard 7c71e03
Use ushort for LifxColor constructor
d8ahazard 9d65e8c
Various LifxResponse fixes
d8ahazard 209a32f
Add datetime, tile support to payload
d8ahazard 9f0feea
Update TileGroup
d8ahazard 7540ae0
Add LifxEmulator Test App
d8ahazard d14436a
Update sample apps
d8ahazard 0813a3b
Fix Tile Chain Response Parsing
d8ahazard 622aec6
Update payload
d8ahazard 6d21da2
Add apply option to multizone setters
d8ahazard ddd6b42
Cleanup
d8ahazard 630ee74
Add app to test color sending
d8ahazard 47f1952
Update logging, add proper ToString() method for LifxColor
d8ahazard 21cfa42
Fix color send test app
d8ahazard ecf9c2e
Update Lifx Emulator
d8ahazard 9262286
LifxColor Improvements
d8ahazard 0d9abed
Add shorter SetColorAsync method
d8ahazard 8d923dc
Improve Color Send Test logging.
d8ahazard 7a28c52
Improve logging
d8ahazard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| using System; | ||
| using System.Linq; | ||
|
|
||
| namespace LifxNet { | ||
| /// <summary> | ||
| /// LIFX Generic Device | ||
| /// </summary> | ||
| public abstract class Device { | ||
| internal Device(string hostname, byte[] macAddress, byte service, uint port) { | ||
| if (hostname == null) | ||
| throw new ArgumentNullException(nameof(hostname)); | ||
| if (string.IsNullOrWhiteSpace(hostname)) | ||
| throw new ArgumentException(nameof(hostname)); | ||
| HostName = hostname; | ||
| MacAddress = macAddress; | ||
| Service = service; | ||
| Port = port; | ||
| LastSeen = DateTime.MinValue; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Hostname for the device | ||
| /// </summary> | ||
| public string HostName { get; internal set; } | ||
|
|
||
| /// <summary> | ||
| /// Service ID | ||
| /// </summary> | ||
| public byte Service { get; } | ||
|
|
||
| /// <summary> | ||
| /// Service port | ||
| /// </summary> | ||
| public uint Port { get; } | ||
|
|
||
| internal DateTime LastSeen { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the MAC address | ||
| /// </summary> | ||
| public byte[] MacAddress { get; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the MAC address | ||
| /// </summary> | ||
| public string MacAddressName { | ||
| get { return string.Join(":", MacAddress.Take(6).Select(tb => tb.ToString("X2")).ToArray()); } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is wrong, the only
LifxClientconstructor is marked asPrivate