Code Monkey home page Code Monkey logo

Comments (5)

rockowitz avatar rockowitz commented on July 22, 2024

@digitaltrails I apologize for having caused you to spend time diagnosing this trivial bug. As you can see, this function was never really tested.

As a practical matter, you can ignore Table type features and use only the simpler ddca_get_non_table_vcp_value() and ddca_set_non_table_vcp_value(). Support for Table type features was implemented based on the DDC/CI spec, before I grasped that there few (as in I've never seen one) monitors that implement the Table type features defined in MCCS 3.0. Monitor makers instead moved on to MCCS 2.2, which provides some of the facilities of 3.0, but in a way that doesn't require Table type.

from ddcutil.

digitaltrails avatar digitaltrails commented on July 22, 2024

@digitaltrails I apologize for having caused you to spend time diagnosing this trivial bug. As you can see, this function was never really tested.

As a practical matter, you can ignore Table type features and use only the simpler ddca_get_non_table_vcp_value() and ddca_set_non_table_vcp_value(). Support for Table type features was implemented based on the DDC/CI spec, before I grasped that there few (as in I've never seen one) monitors that implement the Table type features defined in MCCS 3.0. Monitor makers instead moved on to MCCS 2.2, which provides some of the facilities of 3.0, but in a way that doesn't require Table type.

It was a good learning exercise concerning libddcutil. It was heaps easier than trying to figure out the GDBUS library. My C is a bit rusty (I did more than a decade of C coding, but that was mostly prior to 2000). I think I'm on the right track now with both libraries (except for memory allocation in GDBUS). I've got detect/get/set working and can test via D-Feet.

I was wondering about the table features. I'd actually coded get/set with them included, but then I couldn't find an example of a table.

I've no idea where I'm going with this experiment. If you'd like some example C for wrapping DBUS around libddcutil, that could be one possible use. I may continue to the point where I can use dbus from python and experiment with that in vdu_controls, but that might be quite a bit of work.

from ddcutil.

rockowitz avatar rockowitz commented on July 22, 2024

Hi Michael,

I'm very interested in what you're doing. Making libddcutil a service is, I think, a natural next step. Required for that is for libddcutil to handle display connection/disconnection, sleep, etc. At the last minute I pulled the API functions in this regard from release 2.0, largely based on the problems you identified. It's much simpler to add new functions in the future than handle deprecation, etc. I look forward to seeing what you've done, and if you decide to take the server beyond the proof of concept state, I would welcome either contributions to ddcutil or a standalone git project of your own.

As for C, I thought I'd long since left the language behind. But it is the correct language for building a program like ddcutil that has to interact with the operating system so closely. Coming from Java and Scala, it's painfully low level. I too last did serious work in C in the mid-90's. Perhaps the most interesting thing I did was build inter-language interoperability between C and Pascal in a mainframe environment, in order to interact with a server written in Pascal. (Ok, that really dates me.)

I'm also a fan of Python. It's my goto language when there's not a compelling reason to use another. In fact, Guido van Rossum spoke at a Silicon Valley lecture series I chaired in the early 2000's.

from ddcutil.

digitaltrails avatar digitaltrails commented on July 22, 2024

I reverted to using the non_table_vcp_value methods, I had originally used them, and they do make for easier coding. I've got methods for detect, get, set, capabilities, and featureMetadata methods working. Plus I implemented some properties, such as SleepMultiplier and Version.

So far the whole thing is very small. The code is one C file and a makefile. I'll email you a tar before I go any further. It's easy to play with the server via the d-feet utility, just search for a SessionBus server with ddcutil in its name. Once we can see how big/complex it gets, we can decide what to do with it (it's so small now, that it would be easy to just fold it into ddcutil as an example).

Next I will examine creating a DBUS structure based on what's returned by ddca_parse_capabilities_string(). That looks to be a reasonable chunk of work and I'm not sure when I will get around to it.

There was quite a lot of porting to UNIX in the 80's/90's. That often involved a change of language. In one instance I got a contract porting a mainframe PL/1 simulation to C (mainly to improve the elapsed time). I used C/yacc/lex to write a PL/1 to C translator to do a lot of the work, it still took a few years though. I quickly transitioned through C++ to Java around the end of the century.

I hardly managed to do any Python coding for work. Around 98 I did write a couple of Linux Journal articles about Python in an attempt to help boost it's profile. So, yeah, I was also an early fan of the language.

from ddcutil.

rockowitz avatar rockowitz commented on July 22, 2024

I look forward to seeing what you've created and playing with it.

I'll leave the personal history to email. But I will mention one experience that solidified my appreciation of Python. During the Dot Com boom, I did consulting work for an online pharmacy. They were using Oracle, and if you've ever worked with it you know that its command line scripting is hideous. But there's a JDBC interface to Oracle, and this was a Java shop. So I created a Jython package that imported the JDBC interface. Voila, a high powered "scripting" interface to Oracle that took about a day to create.

from ddcutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.