On Sun, Nov 08, 2020 at 10:43:58AM -0800, Richard Cochran wrote:
> At this point, the header file, pmc_common.h, is collection of two
> interfaces.  I think this needs to be split into two clean modules,
> with the pmc_node hiding the lower level pmc.
>
> The 'pmc' interface comprises
>
>     struct pmc *pmc_create(struct config *cfg, enum transport_type 
> transport_type, ...);
>     void pmc_destroy(struct pmc *pmc);
>     int pmc_get_transport_fd(struct pmc *pmc);
>     int pmc_send_get_action(struct pmc *pmc, int id);
>     int pmc_send_set_action(struct pmc *pmc, int id, void *data, int 
> datasize);
>     struct ptp_message *pmc_recv(struct pmc *pmc);
>     int pmc_target(struct pmc *pmc, struct PortIdentity *pid);
>     void pmc_target_port(struct pmc *pmc, UInteger16 portNumber);
>     void pmc_target_all(struct pmc *pmc);
>     const char *pmc_action_string(int action);
>     int pmc_do_command(struct pmc *pmc, char *str);
>
> These methods are only called by the pmc program and the pmc_node
> methods within pmc_common.c.  Notably, the phc2sys program calls none
> of those methods.  They are completely hidden by the new pmc_node
> methods.
>
> I'm going to work on making pmc_node into its own module today.  I'll
> choose a different name if I can think of one, because "node" is not
> very descriptive.

Yeah, I know, I think it's only you who could do further refactoring
anyway..

> I don't think this will cause much conflict with the remainder of this
> ts2phc series.  If you don't mind, I'll fix that up myself as I
> continue my review...

Well, I'll probably need to resend anyway, I just noticed that patch
"ts2phc: instantiate a full clock structure for every PHC master"
doesn't build. I'm not sure how that passed my QC. So just let me know
when.


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to