Skip to content
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

Add ow naming+snmp #127

Merged
merged 12 commits into from
Apr 10, 2012
Merged

Add ow naming+snmp #127

merged 12 commits into from
Apr 10, 2012

Conversation

sittner
Copy link
Contributor

@sittner sittner commented Mar 10, 2012

Added support for name mapping of onewire rom addresses to meaningful names. Mappings are stored in EEPROM.
Values and names are queryable by snmp.
Option for reading out values via "1w list"

/* global variables */
ow_global_t ow_global;

#ifdef ONEWIRE_NAMING_SUPPORT
ow_name_t ow_names_table[OW_SENSORS_COUNT];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would store the sensor name inside the ow_sensor_t (*ow_sensors) to avoid data duplication of ow_rom_code.

@sittner
Copy link
Contributor Author

sittner commented Mar 29, 2012

The intention behind the usage of ow_names_table where three points:

  • independent usage of ONEWIRE_POLLING_SUPPORT and ONEWIRE_NAMING_SUPPORT
  • edit name table in RAM and make it persistent by ecmd command
  • fixed index table for SNMP support

But you are right, the n x 64 bit rom codes waste a lot of ram. My sugesstion is to use ow_sensors in every case ONEWIRE_POLLING_SUPPORT/ONEWIRE_NAMING_SUPPORT is involved and to define the members as needed. ow_discover_sensor will update records with matching rom codes and append new sensors. The rom codes of named sensors are not touched by ow_discover_sensor if the sensor is not present.

@mguentner
Copy link
Member

Sounds good to me.
While you're at it, can you have a look at my commit which slightly reduces the size of ow_sensor_t ? I haven't tested the code so far. If it works for you, feel free to include the commit in your PR.
mguentner@c057d04

@sittner
Copy link
Contributor Author

sittner commented Mar 29, 2012

I've tried to fix the issues. Your commit is included.

@mguentner
Copy link
Member

That was fast :). Looks good!

Have you tested the code in combination with ONEWIRE_BUSCOUNT > 1 ?
I assume it will work but you cannot be sure without testing. Maybe @sauttefk can test whether the code works with more than one bus.

@sittner
Copy link
Contributor Author

sittner commented Mar 30, 2012

I can test it on weekend. I've planed to split my bus anyway :-)

@sittner
Copy link
Contributor Author

sittner commented Mar 31, 2012

OK. I did the tests even with two buses and I hope I've tested all cominations. I've done the following changes (nothing related to ONEWIRE_BUSCOUNT):

  • trigger discovery on add/remove a name
  • simplified output generation for emcd to save flash memory
  • fix the loop in ow_periodic. Please take a look to the comment in onewire.c on the last commit.

@eku eku mentioned this pull request Apr 10, 2012
@mguentner
Copy link
Member

Please document your changes in the wiki aswell. http://ethersex.de/index.php/Onewire

mguentner added a commit that referenced this pull request Apr 10, 2012
@mguentner mguentner merged commit f9d9b12 into ethersex:master Apr 10, 2012
@sauttefk
Copy link
Contributor

On 10.04.2012 19:32, Maximilian Güntner wrote:

Please document your changes in the wiki aswell.
http://ethersex.de/index.php/Onewire
von mir stammt die multibus geschichte und ein paar verbesserungen am
onewire timining (weniger interrupt blockierung).

die konfiguration der busse ist ja bereits im o.g. link beschrieben, der
rest sind internas, die den normalen nutzer nicht interessieren.

grüße
frank

dangu pushed a commit to dangu/ethersex that referenced this pull request Sep 1, 2012
dangu pushed a commit to dangu/ethersex that referenced this pull request Sep 1, 2012
fix of bug ethersex#127. Implemented a simple parser for PING commands.
dangu pushed a commit to dangu/ethersex that referenced this pull request Sep 1, 2012
fix of bug ethersex#127. Implemented a simple parser for PING commands.
@sittner sittner deleted the add-ow-naming+snmp branch November 29, 2019 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants